Software / code / prosody
Comparison
prosodyctl @ 10141:cf70deac27f6
prosodyctl: Added the 'install' command
| author | João Duarte <jvsDuarte08@gmail.com> |
|---|---|
| date | Wed, 17 Jul 2019 03:20:08 -0700 |
| parent | 10140:cf0ae6eb74e6 |
| child | 10142:1e192e8d4e9d |
comparison
equal
deleted
inserted
replaced
| 10140:cf0ae6eb74e6 | 10141:cf70deac27f6 |
|---|---|
| 148 return 1 | 148 return 1 |
| 149 end | 149 end |
| 150 print("Removing "..arg[1].." from ./plugins") | 150 print("Removing "..arg[1].." from ./plugins") |
| 151 os.execute("luarocks --tree='./plugins' remove "..arg[1]) | 151 os.execute("luarocks --tree='./plugins' remove "..arg[1]) |
| 152 print("Done!") | 152 print("Done!") |
| 153 return 0 | |
| 154 end | |
| 155 | |
| 156 function commands.install(arg) | |
| 157 if arg[1] == "--help" then | |
| 158 show_usage([[make]], [[Installs a rockspec/rock from a specified server]]); | |
| 159 return 1 | |
| 160 end | |
| 161 print("Installing module "..arg[1].." locally, from luarocks repo") | |
| 162 os.execute("luarocks --tree='./plugins' install "..arg[1]) | |
| 153 return 0 | 163 return 0 |
| 154 end | 164 end |
| 155 | 165 |
| 156 function commands.list(arg) | 166 function commands.list(arg) |
| 157 if not arg[1] or arg[1] == "--help" then | 167 if not arg[1] or arg[1] == "--help" then |