summaryrefslogtreecommitdiffstats
path: root/_scripts/generate_latest.lua
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-06-16 21:41:30 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2015-06-16 21:41:30 +0200
commitf4a0b1388cb77da698ac172039139d6ebd4b10af (patch)
tree6a2fb06a910bdfb0f2e1d418b4be8f3fece283d4 /_scripts/generate_latest.lua
parentce924721d6548080b9963c94660c5bbea3d611a0 (diff)
downloadalpine-mksite-f4a0b1388cb77da698ac172039139d6ebd4b10af.tar.bz2
alpine-mksite-f4a0b1388cb77da698ac172039139d6ebd4b10af.tar.xz
use lua-lyaml instead of lua-yaml
it seems to be better maintained upstream
Diffstat (limited to '_scripts/generate_latest.lua')
-rw-r--r--_scripts/generate_latest.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/_scripts/generate_latest.lua b/_scripts/generate_latest.lua
index 2289ddd..794e370 100644
--- a/_scripts/generate_latest.lua
+++ b/_scripts/generate_latest.lua
@@ -1,7 +1,7 @@
#!/uar/bin/lua
-yaml = require('yaml')
-data = yaml.load(io.read("*a"))
+lyaml = require('lyaml')
+data = lyaml.load(io.read("*a"))
table.sort(data, function(a,b)
return (a.date or a.updated) > (b.date or b.updated)
end)
@@ -10,5 +10,5 @@ t = {}
for i=1, 10 do
t[i] = data[i]
end
-io.write(yaml.dump(t))
+io.write(lyaml.dump{t})