diff options
author | Jo?o Duarte <jvsDuarte08@gmail.com> | 2019-07-24 10:43:28 -0700 |
---|---|---|
committer | Jo?o Duarte <jvsDuarte08@gmail.com> | 2019-07-24 10:43:28 -0700 |
commit | 2288a5a3561d8678ab4a9a4cb53771e4784224df (patch) | |
tree | 13cb222bb4b1593459508ebe88c70f0121676441 /prosodyctl | |
parent | 8a516777e10421846c59c3fce74d7899fcbdeed2 (diff) | |
download | prosody-2288a5a3561d8678ab4a9a4cb53771e4784224df.tar.gz prosody-2288a5a3561d8678ab4a9a4cb53771e4784224df.zip |
prosodyctl: The install command now performs its job at a dedicated folder for custom plugins
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -90,6 +90,12 @@ function commands.install(arg) show_usage([[make]], [[Installs a prosody/luarocks plugin]]); return 1; end + local installer_plugin_path + -- I'm considering that we are using just one path to custom plugins, and it is the first in prosody.paths.plugins, for now + for path in prosody.paths.plugins:gmatch("[^;]+") do + installer_plugin_path = path + break + end -- I'm considering this optional flag comes first local flag = "--tree=" if arg[1] and arg[1]:sub(1, #flag) == flag then @@ -99,10 +105,10 @@ function commands.install(arg) show_module_configuration_help(arg[2]); return 0; else - print("Installing module "..arg[1].." at "..prosody.paths.plugins) + print("Installing module "..arg[1].." at "..installer_plugin_path) -- I've build a local server to upload some new rockspecs, like mod_smacks'. We can replace this server by one from -- prosody's, where we can oficially disbrute rocks/rockspecs for all modules - os.execute("luarocks --tree='"..prosody.paths.plugins.."' --server='http://localhost/' install "..arg[1]) + os.execute("luarocks --tree='"..installer_plugin_path.."' --server='http://localhost/' install "..arg[1]) show_module_configuration_help(arg[1]); return 0; end |