76 function commands.install(arg) |
76 function commands.install(arg) |
77 if arg[1] == "--help" then |
77 if arg[1] == "--help" then |
78 show_usage([[install]], [[Installs a prosody/luarocks plugin]]); |
78 show_usage([[install]], [[Installs a prosody/luarocks plugin]]); |
79 return 1; |
79 return 1; |
80 end |
80 end |
|
81 show_message("Installing %s in %s", arg[1], prosody.paths.installer); |
81 -- TODO finalize config option name |
82 -- TODO finalize config option name |
82 local ret = call_luarocks("install", arg[1], configmanager.get("*", "plugin_server") or "http://localhost/"); |
83 local ret = call_luarocks("install", arg[1], configmanager.get("*", "plugin_server") or "http://localhost/"); |
|
84 if ret == 0 and operation == "install" then |
|
85 show_module_configuration_help(mod); |
|
86 end |
83 return ret; |
87 return ret; |
84 end |
88 end |
85 |
89 |
86 function commands.remove(arg) |
90 function commands.remove(arg) |
87 if arg[1] == "--help" then |
91 if arg[1] == "--help" then |
88 show_usage([[remove]], [[Removes a module installed in the working directory's plugins folder]]); |
92 show_usage([[remove]], [[Removes a module installed in the working directory's plugins folder]]); |
89 return 1; |
93 return 1; |
90 end |
94 end |
|
95 show_message("Removing %s from %s", arg[1], prosody.paths.installer); |
91 local ret = call_luarocks("remove", arg[1]); |
96 local ret = call_luarocks("remove", arg[1]); |
92 return ret; |
97 return ret; |
93 end |
98 end |
94 |
99 |
95 function commands.list(arg) |
100 function commands.list(arg) |