Software /
code /
prosody
Comparison
prosodyctl @ 10151:e58034955002
prosodyctl: The install command is now also checking a specified remote server
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Tue, 23 Jul 2019 08:48:31 -0700 |
parent | 10150:baded8cd7da3 |
child | 10153:a88fd34246bd |
comparison
equal
deleted
inserted
replaced
10150:baded8cd7da3 | 10151:e58034955002 |
---|---|
173 -- I'm considering the flag is the first, but there can be many flags | 173 -- I'm considering the flag is the first, but there can be many flags |
174 if arg[1] and arg[1]:sub(1, #flag) == flag then | 174 if arg[1] and arg[1]:sub(1, #flag) == flag then |
175 local dir = arg[1]:match("=(.+)$") | 175 local dir = arg[1]:match("=(.+)$") |
176 print("Installing module "..arg[2].." at "..dir) | 176 print("Installing module "..arg[2].." at "..dir) |
177 -- These extra double brackets allow us to correctly process names with spaces | 177 -- These extra double brackets allow us to correctly process names with spaces |
178 os.execute("luarocks install --tree='"..dir.."' "..arg[2]) | 178 os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' install "..arg[2]) |
179 return 0; | 179 return 0; |
180 else | 180 else |
181 print("Installing module "..arg[1].." at "..prosody.paths.plugins) | 181 print("Installing module "..arg[1].." at "..prosody.paths.plugins) |
182 os.execute("luarocks --tree='"..prosody.paths.plugins.."' install "..arg[1]) | 182 -- I've build a local server to upload some new rockspecs, like mod_smacks'. We can replace this server by one from |
183 -- prosody's, where we can oficially disbrute rocks/rockspecs for all modules | |
184 os.execute("luarocks --tree='"..prosody.paths.plugins.."' --server='http://localhost/' install "..arg[1]) | |
183 return 0; | 185 return 0; |
184 end | 186 end |
185 end | 187 end |
186 | 188 |
187 function commands.list(arg) | 189 function commands.list(arg) |