Software /
code /
prosody
Changeset
10181:c7d5cd766533
util.prosodyctl: Added the call_luarocks function
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Wed, 31 Jul 2019 07:24:43 -0700 |
parents | 10180:152604d54732 |
children | 10182:bb7d537e6fba |
files | util/prosodyctl.lua |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl.lua Wed Jul 31 06:42:13 2019 -0700 +++ b/util/prosodyctl.lua Wed Jul 31 07:24:43 2019 -0700 @@ -306,6 +306,12 @@ 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 @@ reload = reload; get_path_custom_plugins = get_path_custom_plugins; check_flags = check_flags; + call_luarocks = call_luarocks; };