Mercurial > prosody-hg
comparison util/prosodyctl.lua @ 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 | 152604d54732 |
| children | 5eba710e33f9 |
comparison
equal
deleted
inserted
replaced
| 10180:152604d54732 | 10181:c7d5cd766533 |
|---|---|
| 302 if arg[1] and arg[1]:sub(1, #flag) == flag then | 302 if arg[1] and arg[1]:sub(1, #flag) == flag then |
| 303 local dir = arg[1]:match("=(.+)$") | 303 local dir = arg[1]:match("=(.+)$") |
| 304 return true, arg[2], dir; | 304 return true, arg[2], dir; |
| 305 end | 305 end |
| 306 return false, arg[1] | 306 return false, arg[1] |
| 307 end | |
| 308 | |
| 309 local function call_luarocks(operation, mod, dir) | |
| 310 show_message("Installing %s at %s", mod, dir); | |
| 311 os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' "..operation.." "..mod); | |
| 312 show_module_configuration_help(mod); | |
| 307 end | 313 end |
| 308 | 314 |
| 309 return { | 315 return { |
| 310 show_message = show_message; | 316 show_message = show_message; |
| 311 show_warning = show_message; | 317 show_warning = show_message; |
| 326 start = start; | 332 start = start; |
| 327 stop = stop; | 333 stop = stop; |
| 328 reload = reload; | 334 reload = reload; |
| 329 get_path_custom_plugins = get_path_custom_plugins; | 335 get_path_custom_plugins = get_path_custom_plugins; |
| 330 check_flags = check_flags; | 336 check_flags = check_flags; |
| 337 call_luarocks = call_luarocks; | |
| 331 }; | 338 }; |
