Software /
code /
prosody
Changeset
10141:cf70deac27f6
prosodyctl: Added the 'install' command
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Wed, 17 Jul 2019 03:20:08 -0700 |
parents | 10140:cf0ae6eb74e6 |
children | 10142:1e192e8d4e9d |
files | prosodyctl |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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]]);