Software / code / prosody
Comparison
prosodyctl @ 10172:5da519ef2d51
prosodyctl: Corrected the help output of the install and remove commands
| author | João Duarte <jvsDuarte08@gmail.com> |
|---|---|
| date | Fri, 26 Jul 2019 05:53:18 -0700 |
| parent | 10170:882ca2f965d5 |
| child | 10178:badc8610bfdf |
comparison
equal
deleted
inserted
replaced
| 10171:628e238feb04 | 10172:5da519ef2d51 |
|---|---|
| 85 local commands = {}; | 85 local commands = {}; |
| 86 local command = table.remove(arg, 1); | 86 local command = table.remove(arg, 1); |
| 87 | 87 |
| 88 function commands.install(arg) | 88 function commands.install(arg) |
| 89 if arg[1] == "--help" then | 89 if arg[1] == "--help" then |
| 90 show_usage([[make]], [[Installs a prosody/luarocks plugin]]); | 90 show_usage([[install]], [[Installs a prosody/luarocks plugin]]); |
| 91 return 1; | 91 return 1; |
| 92 end | 92 end |
| 93 local installer_plugin_path = prosodyctl.get_path_custom_plugins(prosody.paths.plugins) | 93 local installer_plugin_path = prosodyctl.get_path_custom_plugins(prosody.paths.plugins) |
| 94 -- I'm considering this optional flag comes first | 94 -- I'm considering this optional flag comes first |
| 95 local flag = "--tree=" | 95 local flag = "--tree=" |
| 109 end | 109 end |
| 110 end | 110 end |
| 111 | 111 |
| 112 function commands.remove(arg) | 112 function commands.remove(arg) |
| 113 if arg[1] == "--help" then | 113 if arg[1] == "--help" then |
| 114 show_usage([[make]], [[Removes a module installed in the wroking directory's plugins folder]]); | 114 show_usage([[remove]], [[Removes a module installed in the wroking directory's plugins folder]]); |
| 115 return 1; | 115 return 1; |
| 116 end | 116 end |
| 117 -- I'm considering that we are using just one path to custom plugins, and it is the first in prosody.paths.plugins, for now | 117 -- I'm considering that we are using just one path to custom plugins, and it is the first in prosody.paths.plugins, for now |
| 118 local installer_plugin_path = prosodyctl.get_path_custom_plugins(prosody.paths.plugins) | 118 local installer_plugin_path = prosodyctl.get_path_custom_plugins(prosody.paths.plugins) |
| 119 local flag = "--tree=" | 119 local flag = "--tree=" |