diff options
author | João Duarte <jvsDuarte08@gmail.com> | 2019-07-31 07:24:43 -0700 |
---|---|---|
committer | João Duarte <jvsDuarte08@gmail.com> | 2019-07-31 07:24:43 -0700 |
commit | b60081c28ce425696a3839d10039f23d6250e840 (patch) | |
tree | d8b25af6fb253afb4de06ba31fde7c679e39ee13 /util | |
parent | d2524edff49771ad0c131ac85461241eb6cd99f3 (diff) | |
download | prosody-b60081c28ce425696a3839d10039f23d6250e840.tar.gz prosody-b60081c28ce425696a3839d10039f23d6250e840.zip |
util.prosodyctl: Added the call_luarocks function
Diffstat (limited to 'util')
-rw-r--r-- | util/prosodyctl.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index affa2f6b..22571061 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -306,6 +306,12 @@ local function check_flags(arg) return false, arg[1] end +local function call_luarocks(operation, mod, dir) + show_message("Installing %s at %s", mod, dir); + os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' "..operation.." "..mod); + show_module_configuration_help(mod); +end + return { show_message = show_message; show_warning = show_message; @@ -328,4 +334,5 @@ return { reload = reload; get_path_custom_plugins = get_path_custom_plugins; check_flags = check_flags; + call_luarocks = call_luarocks; }; |