summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-12-11 15:53:33 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2020-12-11 15:53:33 +0100
commit39cfb8c4d2231e8d14d69fb33640d7df02aed793 (patch)
tree88e5233f2841351e1b4e859541c151280a969f6e
parent23ee73ca93f95ce618ee3b31b6f1d03d791f7929 (diff)
downloadlua-aports-39cfb8c4d2231e8d14d69fb33640d7df02aed793.tar.gz
lua-aports-39cfb8c4d2231e8d14d69fb33640d7df02aed793.tar.bz2
lua-aports-39cfb8c4d2231e8d14d69fb33640d7df02aed793.tar.xz
ap: rename recursdeps to recursive-deps
-rwxr-xr-xbin/ap.lua15
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/ap.lua b/bin/ap.lua
index dc73d91..6345d5e 100755
--- a/bin/ap.lua
+++ b/bin/ap.lua
@@ -5,6 +5,7 @@ local lfs = require('lfs')
-- subcommands -----------------------
local subcmd = {}
+local deprecated = {}
subcmd.revdep = {
desc = "Print reverse dependencies",
@@ -28,7 +29,7 @@ subcmd.list = {
end
}
-subcmd.recursdeps = {
+subcmd["recursive-deps"] = {
desc = "Recursively print all make dependencies for given packages",
usage = "PKG...",
run = function (db, opts)
@@ -40,6 +41,14 @@ subcmd.recursdeps = {
end
}
+-- for backwards compatiblity
+subcmd.recursdeps = {
+ desc = "Alias to recursive-deps for compatibility",
+ usage = "PKG...",
+ run = subcmd["recursive-deps"].run
+}
+deprecated.recursdeps = true
+
subcmd["recursive-revdeps"] = {
desc = "Recursively print all reverse make dependencies for given packages",
usage = "PKG...",
@@ -124,7 +133,9 @@ subcmd["toplevel-aports"] = {
local function print_usage()
io.write("usage: ap -d <DIR> SUBCOMMAND [options]\n\nSubcommands are:\n")
for k in pairs(subcmd) do
- print(" "..k)
+ if not deprecated[k] then
+ print(" "..k)
+ end
end
end