Software /
code /
prosody
Comparison
prosodyctl @ 10140:cf0ae6eb74e6
prosodyctl: Added the 'remove' command
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Tue, 16 Jul 2019 10:34:13 -0700 |
parent | 10139:7aa3d8155c96 |
child | 10141:cf70deac27f6 |
comparison
equal
deleted
inserted
replaced
10139:7aa3d8155c96 | 10140:cf0ae6eb74e6 |
---|---|
135 if arg[1] == "--help" then | 135 if arg[1] == "--help" then |
136 show_usage([[make]], [[Installs a module with sources available locally]]); | 136 show_usage([[make]], [[Installs a module with sources available locally]]); |
137 return 1 | 137 return 1 |
138 end | 138 end |
139 os.execute("cd downloaded_modules/"..arg[1].." && luarocks --tree='../../plugins' make "..arg[1].."-scm-1.rockspec") | 139 os.execute("cd downloaded_modules/"..arg[1].." && luarocks --tree='../../plugins' make "..arg[1].."-scm-1.rockspec") |
140 return 0 | |
141 end | |
142 | |
143 -- Command to remove a rockspec | |
144 -- Receives as an argument the name of the plugin to be removed from the plugins folder | |
145 function commands.remove(arg) | |
146 if arg[1] == "--help" then | |
147 show_usage([[make]], [[Removes a module installed in the wroking directory's plugins folder]]); | |
148 return 1 | |
149 end | |
150 print("Removing "..arg[1].." from ./plugins") | |
151 os.execute("luarocks --tree='./plugins' remove "..arg[1]) | |
152 print("Done!") | |
140 return 0 | 153 return 0 |
141 end | 154 end |
142 | 155 |
143 function commands.list(arg) | 156 function commands.list(arg) |
144 if not arg[1] or arg[1] == "--help" then | 157 if not arg[1] or arg[1] == "--help" then |