mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-22 07:00:28 +00:00
ap: new subcommand: list-apks
This commit is contained in:
parent
65edee22f2
commit
cf102231ea
16
ap.in
16
ap.in
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/lua
|
#!/usr/bin/lua
|
||||||
|
|
||||||
require("aports")
|
aports = require("aports")
|
||||||
require("lfs")
|
lfs = require("lfs")
|
||||||
|
|
||||||
local db
|
local db
|
||||||
|
|
||||||
@ -130,6 +130,18 @@ subcmd["build-list"] = {
|
|||||||
end
|
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()
|
function print_usage()
|
||||||
io.write("usage: ap -d <DIR> SUBCOMMAND [options]\n\nSubcommands are:\n")
|
io.write("usage: ap -d <DIR> SUBCOMMAND [options]\n\nSubcommands are:\n")
|
||||||
local k,v
|
local k,v
|
||||||
|
Loading…
Reference in New Issue
Block a user