# HG changeset patch # User João Duarte # Date 1563358808 25200 # Node ID cf70deac27f6a2e2ca0774cfb5fb9040a98b67eb # Parent cf0ae6eb74e68b804a5922a813a89ce1d9a6eb4a prosodyctl: Added the 'install' command diff -r cf0ae6eb74e6 -r cf70deac27f6 prosodyctl --- a/prosodyctl Tue Jul 16 10:34:13 2019 -0700 +++ b/prosodyctl Wed Jul 17 03:20:08 2019 -0700 @@ -153,6 +153,16 @@ return 0 end +function commands.install(arg) + if arg[1] == "--help" then + show_usage([[make]], [[Installs a rockspec/rock from a specified server]]); + return 1 + end + print("Installing module "..arg[1].." locally, from luarocks repo") + os.execute("luarocks --tree='./plugins' install "..arg[1]) + return 0 +end + function commands.list(arg) if not arg[1] or arg[1] == "--help" then show_usage([[list]], [[Shows installed rocks]]);