aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-mirrors/gen-txt.lua
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-11-29 15:32:51 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-11-29 15:34:14 +0000
commitf35a00c1f707409f5f2509a679bb05ec92988b7f (patch)
tree3ecca2a437b1b66e53e0c7739fbe0e22ef6a610b /main/alpine-mirrors/gen-txt.lua
parent7d4a2dcc9adc1939f9c7026c8fa676bb4d6cbcfc (diff)
downloadaports-f35a00c1f707409f5f2509a679bb05ec92988b7f.tar.bz2
aports-f35a00c1f707409f5f2509a679bb05ec92988b7f.tar.xz
main/alpine-mirrors: switch to yaml format
fixes #2168
Diffstat (limited to 'main/alpine-mirrors/gen-txt.lua')
-rw-r--r--main/alpine-mirrors/gen-txt.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/alpine-mirrors/gen-txt.lua b/main/alpine-mirrors/gen-txt.lua
new file mode 100644
index 0000000000..cfda91fa8e
--- /dev/null
+++ b/main/alpine-mirrors/gen-txt.lua
@@ -0,0 +1,12 @@
+#!/usr/bin/lua
+
+yaml = require('yaml')
+
+data = yaml.load(io.stdin:read("*all"))
+for _,m in pairs(data) do
+ for _,url in pairs(m.urls) do
+ if (url):match("^http://") then
+ print(url)
+ end
+ end
+end