prosodyctl: The install command is now also checking a specified remote server
authorJoão Duarte <jvsDuarte08@gmail.com>
Tue, 23 Jul 2019 08:48:31 -0700
changeset 10155 e58034955002
parent 10154 baded8cd7da3
child 10156 7e9c30eab11e
prosodyctl: The install command is now also checking a specified remote server
prosodyctl
--- a/prosodyctl	Tue Jul 23 08:36:06 2019 -0700
+++ b/prosodyctl	Tue Jul 23 08:48:31 2019 -0700
@@ -175,11 +175,13 @@
 		local dir = arg[1]:match("=(.+)$")
 		print("Installing module "..arg[2].." at "..dir)
 		-- These extra double brackets allow us to correctly process names with spaces
-		os.execute("luarocks install --tree='"..dir.."' "..arg[2])
+		os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' install "..arg[2])
 		return 0;
 	else
 		print("Installing module "..arg[1].." at "..prosody.paths.plugins)
-		os.execute("luarocks --tree='"..prosody.paths.plugins.."' install "..arg[1])
+		-- 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])
 		return 0;
 	end
 end