summaryrefslogtreecommitdiffstats
path: root/_scripts
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-06-26 17:38:34 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2018-06-26 17:38:34 +0200
commit908b8f330dc0bc7fc7010b8b83b4b9df60d55f52 (patch)
tree6636294f8695c6f80397ff2576cb1849b86efa1e /_scripts
parent13866c739c83c1debe0cd65c575fd9d1dc0875a7 (diff)
parent2ac35d765835a4027ab8e6ffa599efd61647baa3 (diff)
downloadalpine-mksite-908b8f330dc0bc7fc7010b8b83b4b9df60d55f52.tar.bz2
alpine-mksite-908b8f330dc0bc7fc7010b8b83b4b9df60d55f52.tar.xz
Merge branch 'master' into production
Diffstat (limited to '_scripts')
-rw-r--r--_scripts/generate_releases.lua73
1 files changed, 13 insertions, 60 deletions
diff --git a/_scripts/generate_releases.lua b/_scripts/generate_releases.lua
index 04bae30..0a3b77b 100644
--- a/_scripts/generate_releases.lua
+++ b/_scripts/generate_releases.lua
@@ -5,67 +5,18 @@ lyaml = require("lyaml")
url_prefix="http://dl-cdn.alpinelinux.org/alpine"
t = { flavors={} }
-flavor_def = {
- {
- flavor = "alpine-standard",
- title = "Standard",
- desc = "Alpine as it was intended.\n"..
- "Just enough to get you started.\n"..
- "Network connection required.",
- }, {
- flavor = "alpine-extended",
- title = "Extended",
- desc = "Most common used packages included.\n"..
- "Suitable for routers and servers.\n"..
- "Runs from RAM.",
- }, {
- flavor = "alpine-vanilla",
- title = "Vanilla",
- desc = "Includes a vanilla kernel.\n"..
- "Does not include grsec patch set.\n"..
- "Suitable for debugging.",
- }, {
- flavor = "alpine-virt",
- title = "Virtual",
- desc = "Similar to standard.\n"..
- "Slimmed down kernel.\n"..
- "Optimized for virtual systems.",
- }, {
- flavor = "alpine-xen",
- title = "Xen",
- desc = "Built-in support for Xen Hypervisor.\n"..
- "Includes packages targed at Xen usage.\n"..
- "Includes grsec kernel.",
- }, {
- flavor = "alpine-minirootfs",
- title = "Mini root filesystem",
- desc = "Minimal root filesystem.\n"..
- "For use in containers.\n"..
- "and minimal chroots"
- }, {
- flavor = "alpine-rpi",
- title = "Raspberry Pi",
- desc = "Includes Raspberry Pi kernel.\n"..
- "Does not include grsec patchset.\n",
- "And much more...",
- }, {
- flavor = "alpine-uboot",
- title = "Generic ARM",
- desc = "Has default ARM kernel.\n"..
- "Includes the uboot bootloader.\n"..
- "Supports armhf and aarch64.",
- }
+-- list those flavors first, the rest will be random
+flavor_index = {
+ ["alpine-standard"] = 1,
+ ["alpine-extended"] = 2,
+ ["alpine-netboot"] = 3,
}
+numflavors = 3
-- number of different colors for flavors in CSS
num_colors = 7
-flavor_index = {}
-for i,f in pairs(flavor_def) do
- flavor_index[f.flavor] = i
-end
-
for i = 1,#arg do
local f = assert(io.open(arg[i]))
@@ -81,21 +32,23 @@ for i = 1,#arg do
v.size_mb=math.floor(v.size/(1024*1024))
local n = flavor_index[v.flavor]
+ if n == nil then
+ numflavors = numflavors + 1
+ n = numflavors
+ flavor_index[v.flavor] = n
+ end
local flavor = t.flavors[n]
if flavor == nil then
- local def = flavor_def[n] or {title="", desc=""}
flavor = {
archs = {},
- flavor_title = v.title or def.title,
- flavor_desc = v.desc or def.desc,
+ flavor_title = v.title or "",
+ flavor_desc = v.desc or "",
flavor_name = string.lower(v.flavor),
flavor_color = (flavor_index[v.flavor]-1) % num_colors
}
t.flavors[n] = flavor
end
--- flavor[v.arch] = v
table.insert(flavor.archs, v)
--- t[v.flavor] = flavor
end
end