# HG changeset patch # User João Duarte # Date 1564583083 25200 # Node ID c7d5cd7665336235e1a54a50b71c78cb42d5d987 # Parent 152604d54732cfd448afa8a6d2fae3ece4c8f8c7 util.prosodyctl: Added the call_luarocks function diff -r 152604d54732 -r c7d5cd766533 util/prosodyctl.lua --- 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; };