Software /
code /
prosody
Comparison
prosodyctl @ 10139:7aa3d8155c96
prosodyctl: Added the 'make' function
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Tue, 16 Jul 2019 10:26:44 -0700 |
parent | 10138:e1ca0d1b5467 |
child | 10140:cf0ae6eb74e6 |
comparison
equal
deleted
inserted
replaced
10138:e1ca0d1b5467 | 10139:7aa3d8155c96 |
---|---|
124 print("Writing rockspec for "..arg[1]) | 124 print("Writing rockspec for "..arg[1]) |
125 os.execute("luarocks write_rockspec "..arg[1].." ./downloaded_modules/"..arg[1]) | 125 os.execute("luarocks write_rockspec "..arg[1].." ./downloaded_modules/"..arg[1]) |
126 print("Rockspec created! Moving it into the ./downloaded_modules/"..arg[1].." folder") | 126 print("Rockspec created! Moving it into the ./downloaded_modules/"..arg[1].." folder") |
127 os.execute("mv "..arg[1].."-scm-1.rockspec ./downloaded_modules/"..arg[1]) | 127 os.execute("mv "..arg[1].."-scm-1.rockspec ./downloaded_modules/"..arg[1]) |
128 print("Done!") | 128 print("Done!") |
129 return 0 | |
130 end | |
131 | |
132 -- Command to install a rockspec with local sources | |
133 -- The module is installed at the plugins folder | |
134 function commands.make(arg) | |
135 if arg[1] == "--help" then | |
136 show_usage([[make]], [[Installs a module with sources available locally]]); | |
137 return 1 | |
138 end | |
139 os.execute("cd downloaded_modules/"..arg[1].." && luarocks --tree='../../plugins' make "..arg[1].."-scm-1.rockspec") | |
129 return 0 | 140 return 0 |
130 end | 141 end |
131 | 142 |
132 function commands.list(arg) | 143 function commands.list(arg) |
133 if not arg[1] or arg[1] == "--help" then | 144 if not arg[1] or arg[1] == "--help" then |