ap: new subcommand: list-apks

This commit is contained in:
Natanael Copa 2013-04-23 07:41:27 +00:00
parent 65edee22f2
commit cf102231ea
1 changed files with 14 additions and 2 deletions

16
ap.in
View File

@ -1,7 +1,7 @@
#!/usr/bin/lua
require("aports")
require("lfs")
aports = require("aports")
lfs = require("lfs")
local db
@ -130,6 +130,18 @@ subcmd["build-list"] = {
end
}
subcmd["list-apks"] = {
desc = "List all apk files",
usage = "",
run = function()
db:foreach(function(k)
db:foreach_pkg(k, function(_, p)
print(aports.get_apk_filename(p))
end)
end)
end
}
function print_usage()
io.write("usage: ap -d <DIR> SUBCOMMAND [options]\n\nSubcommands are:\n")
local k,v