diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-08-04 12:21:32 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-08-04 12:22:53 +0000 |
commit | 0b605e179eaede6f1d22abf63147a7e5059a26b5 (patch) | |
tree | b1b98481b51b02744f19ddf017cc3dcb4f4c4e6c /ap.in | |
parent | 4335602da9641f670a81a3ce23324acacb91e3a3 (diff) | |
download | abuild-0b605e179eaede6f1d22abf63147a7e5059a26b5.tar.gz abuild-0b605e179eaede6f1d22abf63147a7e5059a26b5.tar.bz2 abuild-0b605e179eaede6f1d22abf63147a7e5059a26b5.tar.xz abuild-0b605e179eaede6f1d22abf63147a7e5059a26b5.zip |
aports.lua: parse source strings
Diffstat (limited to 'ap.in')
-rwxr-xr-x | ap.in | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -68,6 +68,20 @@ subcmd.builddirs = { end } +subcmd.sources = { + desc = "List sources", + usage = "PKG...", + run = function(opts) + local i, p, _ + for i = 2, #opts do + db:foreach_pkg(opts[i], function(_, p) + aports.foreach_remote_source(p, function(url) + print(p.pkgname, p.pkgver, string.gsub(url, p.pkgver, "$VERSION")) + end) + end) + end + end +} function print_usage() io.write("usage: ap -d <DIR> SUBCOMMAND [options]\n\nSubcommands are:\n") |