diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-19 11:09:39 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 15:51:13 -0300 |
commit | e0af9ea7a7d7ba2aba76f975bf0d1c9965649ab8 (patch) | |
tree | 27279d0e330d2a4d11cd5163a639ec3921ef215b /src/bin | |
parent | 10ee65ec23a9b107c712bd7b017083c9a5571b0c (diff) | |
download | luarocks-e0af9ea7a7d7ba2aba76f975bf0d1c9965649ab8.tar.gz luarocks-e0af9ea7a7d7ba2aba76f975bf0d1c9965649ab8.tar.bz2 luarocks-e0af9ea7a7d7ba2aba76f975bf0d1c9965649ab8.zip |
cmd: new command-line initialization sequence
Diffstat (limited to 'src/bin')
-rwxr-xr-x | src/bin/luarocks | 6 | ||||
-rwxr-xr-x | src/bin/luarocks-admin | 9 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/bin/luarocks b/src/bin/luarocks index d776445c..d0df0532 100755 --- a/src/bin/luarocks +++ b/src/bin/luarocks | |||
@@ -6,9 +6,9 @@ local cfg = require("luarocks.core.cfg") | |||
6 | local loader = require("luarocks.loader") | 6 | local loader = require("luarocks.loader") |
7 | local cmd = require("luarocks.cmd") | 7 | local cmd = require("luarocks.cmd") |
8 | 8 | ||
9 | program_description = "LuaRocks main command-line interface" | 9 | local description = "LuaRocks main command-line interface" |
10 | 10 | ||
11 | commands = { | 11 | local commands = { |
12 | help = "luarocks.cmd.help", | 12 | help = "luarocks.cmd.help", |
13 | init = "luarocks.cmd.init", | 13 | init = "luarocks.cmd.init", |
14 | pack = "luarocks.cmd.pack", | 14 | pack = "luarocks.cmd.pack", |
@@ -33,4 +33,4 @@ commands = { | |||
33 | test = "luarocks.cmd.test", | 33 | test = "luarocks.cmd.test", |
34 | } | 34 | } |
35 | 35 | ||
36 | cmd.run_command(...) | 36 | cmd.run_command(description, commands, ...) |
diff --git a/src/bin/luarocks-admin b/src/bin/luarocks-admin index 4521ac26..e27b8c01 100755 --- a/src/bin/luarocks-admin +++ b/src/bin/luarocks-admin | |||
@@ -1,14 +1,11 @@ | |||
1 | #!/usr/bin/env lua | 1 | #!/usr/bin/env lua |
2 | 2 | ||
3 | -- this should be loaded first. | ||
4 | local cfg = require("luarocks.core.cfg") | ||
5 | |||
6 | local loader = require("luarocks.loader") | 3 | local loader = require("luarocks.loader") |
7 | local cmd = require("luarocks.cmd") | 4 | local cmd = require("luarocks.cmd") |
8 | 5 | ||
9 | program_description = "LuaRocks repository administration interface" | 6 | local description = "LuaRocks repository administration interface" |
10 | 7 | ||
11 | commands = { | 8 | local commands = { |
12 | help = "luarocks.cmd.help", | 9 | help = "luarocks.cmd.help", |
13 | make_manifest = "luarocks.admin.cmd.make_manifest", | 10 | make_manifest = "luarocks.admin.cmd.make_manifest", |
14 | add = "luarocks.admin.cmd.add", | 11 | add = "luarocks.admin.cmd.add", |
@@ -16,4 +13,4 @@ commands = { | |||
16 | refresh_cache = "luarocks.admin.cmd.refresh_cache", | 13 | refresh_cache = "luarocks.admin.cmd.refresh_cache", |
17 | } | 14 | } |
18 | 15 | ||
19 | cmd.run_command(...) | 16 | cmd.run_command(description, commands, ...) |