Comparison

util/prosodyctl.lua @ 10183:5eba710e33f9

util.prosodyctl: Function now differentiates its output, depending if it is being called by install or remove
author João Duarte <jvsDuarte08@gmail.com>
date Wed, 31 Jul 2019 10:02:42 -0700
parent 10181:c7d5cd766533
child 10185:02d8f475a96d
comparison
equal deleted inserted replaced
10182:bb7d537e6fba 10183:5eba710e33f9
305 end 305 end
306 return false, arg[1] 306 return false, arg[1]
307 end 307 end
308 308
309 local function call_luarocks(operation, mod, dir) 309 local function call_luarocks(operation, mod, dir)
310 if operation == "install" then
310 show_message("Installing %s at %s", mod, dir); 311 show_message("Installing %s at %s", mod, dir);
311 os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' "..operation.." "..mod); 312 elseif operation == "remove" then
313 show_message("Removing %s from %s", mod, dir);
314 end
315 os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' "..operation.." "..mod);
316 if operation == "install" then
312 show_module_configuration_help(mod); 317 show_module_configuration_help(mod);
318 end
313 end 319 end
314 320
315 return { 321 return {
316 show_message = show_message; 322 show_message = show_message;
317 show_warning = show_message; 323 show_warning = show_message;