diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-30 09:25:52 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-30 09:25:52 +0000 |
commit | b5d9c1e6c7fd4cfdd193d19e944ff4421456edc2 (patch) | |
tree | e84ce12a5681885d81600f633eb2e6d1b46b053b | |
parent | aa65657a763cab55e87bdfcef97bd440d0caf354 (diff) | |
download | abuild-b5d9c1e6c7fd4cfdd193d19e944ff4421456edc2.tar.gz abuild-b5d9c1e6c7fd4cfdd193d19e944ff4421456edc2.tar.bz2 abuild-b5d9c1e6c7fd4cfdd193d19e944ff4421456edc2.tar.xz abuild-b5d9c1e6c7fd4cfdd193d19e944ff4421456edc2.zip |
ap: cleanup. do not pass the cmd it self as option
-rwxr-xr-x | ap.in | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -12,7 +12,7 @@ subcmd.revdep = { usage = "PKG...", run = function(opts) local i - for i = 2, #opts do + for i = 1, #opts do db:foreach_revdep(opts[i], function (k,p) print(p.pkgname) end) @@ -34,7 +34,7 @@ subcmd.recursdeps = { desc = "Recursively print all make dependencies for given packages", usage = "PKG...", run = function (opts) - for i = 2, #opts do + for i = 1, #opts do db:recurs_until(opts[i], function(pn) print(pn) end) @@ -49,12 +49,12 @@ subcmd.builddirs = { local i, p, _ local visited = {} local to_print = {} - for i = 2, #opts do + for i = 1, #opts do db:foreach_pkg(opts[i], function(_, p) to_print[p.dir] = true end) end - for i = 2, #opts do + for i = 1, #opts do db:recurs_until(opts[i], function(pn) local j,p db:foreach_pkg(pn, function(j, p) @@ -73,7 +73,7 @@ subcmd.sources = { usage = "PKG...", run = function(opts) local i, p, _ - for i = 2, #opts do + for i = 1, #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")) @@ -112,7 +112,7 @@ while i <= #arg do end -cmd = opts[1] +cmd = table.remove(opts, 1) if cmd == nil then print_usage() |