summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-06-19 11:09:39 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-07-01 15:51:13 -0300
commite0af9ea7a7d7ba2aba76f975bf0d1c9965649ab8 (patch)
tree27279d0e330d2a4d11cd5163a639ec3921ef215b /src/bin
parent10ee65ec23a9b107c712bd7b017083c9a5571b0c (diff)
downloadluarocks-e0af9ea7a7d7ba2aba76f975bf0d1c9965649ab8.tar.gz
luarocks-e0af9ea7a7d7ba2aba76f975bf0d1c9965649ab8.tar.bz2
luarocks-e0af9ea7a7d7ba2aba76f975bf0d1c9965649ab8.zip
cmd: new command-line initialization sequence
Diffstat (limited to 'src/bin')
-rwxr-xr-xsrc/bin/luarocks6
-rwxr-xr-xsrc/bin/luarocks-admin9
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")
6local loader = require("luarocks.loader") 6local loader = require("luarocks.loader")
7local cmd = require("luarocks.cmd") 7local cmd = require("luarocks.cmd")
8 8
9program_description = "LuaRocks main command-line interface" 9local description = "LuaRocks main command-line interface"
10 10
11commands = { 11local 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
36cmd.run_command(...) 36cmd.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.
4local cfg = require("luarocks.core.cfg")
5
6local loader = require("luarocks.loader") 3local loader = require("luarocks.loader")
7local cmd = require("luarocks.cmd") 4local cmd = require("luarocks.cmd")
8 5
9program_description = "LuaRocks repository administration interface" 6local description = "LuaRocks repository administration interface"
10 7
11commands = { 8local 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
19cmd.run_command(...) 16cmd.run_command(description, commands, ...)