From e0af9ea7a7d7ba2aba76f975bf0d1c9965649ab8 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 19 Jun 2018 11:09:39 -0300 Subject: cmd: new command-line initialization sequence --- src/bin/luarocks | 6 +++--- src/bin/luarocks-admin | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'src/bin') 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") local loader = require("luarocks.loader") local cmd = require("luarocks.cmd") -program_description = "LuaRocks main command-line interface" +local description = "LuaRocks main command-line interface" -commands = { +local commands = { help = "luarocks.cmd.help", init = "luarocks.cmd.init", pack = "luarocks.cmd.pack", @@ -33,4 +33,4 @@ commands = { test = "luarocks.cmd.test", } -cmd.run_command(...) +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 @@ #!/usr/bin/env lua --- this should be loaded first. -local cfg = require("luarocks.core.cfg") - local loader = require("luarocks.loader") local cmd = require("luarocks.cmd") -program_description = "LuaRocks repository administration interface" +local description = "LuaRocks repository administration interface" -commands = { +local commands = { help = "luarocks.cmd.help", make_manifest = "luarocks.admin.cmd.make_manifest", add = "luarocks.admin.cmd.add", @@ -16,4 +13,4 @@ commands = { refresh_cache = "luarocks.admin.cmd.refresh_cache", } -cmd.run_command(...) +cmd.run_command(description, commands, ...) -- cgit v1.2.3-55-g6feb