diff options
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") |