diff options
| author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2017-12-01 20:00:37 +0000 | 
|---|---|---|
| committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2017-12-01 20:00:37 +0000 | 
| commit | 36bc4a1e54d0ad5a8e1447d00f65754131f35ada (patch) | |
| tree | 75c1b830c3f85e0e11f3d297a5c1ab72bc778cd4 /generate-html.lua | |
| parent | 44b7203dc9fe828e917eb10e8af98ca366ac53b0 (diff) | |
| download | alpine-mirror-status-36bc4a1e54d0ad5a8e1447d00f65754131f35ada.tar.bz2 alpine-mirror-status-36bc4a1e54d0ad5a8e1447d00f65754131f35ada.tar.xz  | |
rename output html
Diffstat (limited to 'generate-html.lua')
| -rwxr-xr-x | generate-html.lua | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/generate-html.lua b/generate-html.lua index 4decea2..7b4772c 100755 --- a/generate-html.lua +++ b/generate-html.lua @@ -6,7 +6,8 @@ local lustache = require("lustache")  local utils = require("utils")  local outdir = "_out" -local mirrors_file = outdir.."/mirror-status.json" +local mirrors_html = "index.html" +local mirrors_json = "mirror-status.json"  function get_branches(indexes)  	local res = {} @@ -149,9 +150,9 @@ function build_tables(indexes)  	return res  end -local indexes = json.decode(utils.read_file(mirrors_file)) +local indexes = json.decode(utils.read_file(outdir.."/"..mirrors_json))  local thead = get_branches(indexes)  table.insert(thead, 1, "branch/release")  local view = { lupdate = os.date("%c", indexes.date), mirrors = build_tables(indexes), thead = thead }  local tpl = utils.read_file("index.tpl") -utils.write_file(outdir.."/output.html", lustache:render(tpl, view)) +utils.write_file(outdir.."/"..mirrors_html, lustache:render(tpl, view))  | 
