From cf102231ea9d1ab29536c64401543253516e21c7 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 23 Apr 2013 07:41:27 +0000 Subject: [PATCH] ap: new subcommand: list-apks --- ap.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ap.in b/ap.in index e5ce0e7..13f68fb 100755 --- a/ap.in +++ b/ap.in @@ -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 SUBCOMMAND [options]\n\nSubcommands are:\n") local k,v