aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorJo?o Duarte <jvsDuarte08@gmail.com>2019-07-16 10:34:13 -0700
committerJo?o Duarte <jvsDuarte08@gmail.com>2019-07-16 10:34:13 -0700
commitf4d9999bfa8a620508833160483acd0fb9b413bd (patch)
tree1f7f0dac1f5224e82c08ba5295f0128793e956cb /prosodyctl
parent4c4eb9d656b576a221126ac7a805e17c303fc8cb (diff)
downloadprosody-f4d9999bfa8a620508833160483acd0fb9b413bd.tar.gz
prosody-f4d9999bfa8a620508833160483acd0fb9b413bd.zip
prosodyctl: Added the 'remove' command
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl13
1 files changed, 13 insertions, 0 deletions
diff --git a/prosodyctl b/prosodyctl
index 7f7b515e..dac0c1f9 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -140,6 +140,19 @@ function commands.make(arg)
return 0
end
+-- Command to remove a rockspec
+-- Receives as an argument the name of the plugin to be removed from the plugins folder
+function commands.remove(arg)
+ if arg[1] == "--help" then
+ show_usage([[make]], [[Removes a module installed in the wroking directory's plugins folder]]);
+ return 1
+ end
+ print("Removing "..arg[1].." from ./plugins")
+ os.execute("luarocks --tree='./plugins' remove "..arg[1])
+ print("Done!")
+ return 0
+end
+
function commands.list(arg)
if not arg[1] or arg[1] == "--help" then
show_usage([[list]], [[Shows installed rocks]]);