aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xprosodyctl9
1 files changed, 4 insertions, 5 deletions
diff --git a/prosodyctl b/prosodyctl
index 9990a485..72f7cbb5 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -95,12 +95,12 @@ function commands.install(arg)
local flag = "--tree="
if arg[1] and arg[1]:sub(1, #flag) == flag then
local dir = arg[1]:match("=(.+)$")
- print("Installing module "..arg[2].." at "..dir)
+ show_message("Installing module %s at %s", arg[2], dir)
os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' install "..arg[2])
show_module_configuration_help(arg[2]);
return 0;
else
- print("Installing module "..arg[1].." at "..installer_plugin_path)
+ show_message("Installing module %s at %s", arg[1], installer_plugin_path)
-- I've build a local server to upload some new rockspecs, like mod_smacks'. We can replace this server by one from
-- prosody's, where we can oficially disbrute rocks/rockspecs for all modules
os.execute("luarocks --tree='"..installer_plugin_path.."' --server='http://localhost/' install "..arg[1])
@@ -120,13 +120,12 @@ function commands.remove(arg)
-- I'm considering this optional flag comes first
if arg[1] and arg[1]:sub(1, #flag) == flag then
local dir = arg[1]:match("=(.+)$")
- print("Removing module "..arg[2].." at "..dir)
+ show_message("Removing module %s at %s", arg[2], dir)
os.execute("luarocks remove --tree='"..dir.."' "..arg[2])
return 0;
else
- print("Removing "..arg[1].." from "..installer_plugin_path)
+ show_message("Removing %s from %s", arg[1], installer_plugin_path)
os.execute("luarocks --tree='"..installer_plugin_path.."' remove "..arg[1])
- print("Done!")
return 0;
end
end