From 5b190cf27618c048a69021dae3415727a50630e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Tue, 16 Jul 2019 10:34:13 -0700 Subject: prosodyctl: Added the 'remove' command --- prosodyctl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'prosodyctl') 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]]); -- cgit v1.2.3