# HG changeset patch # User João Duarte # Date 1563298453 25200 # Node ID cf0ae6eb74e68b804a5922a813a89ce1d9a6eb4a # Parent 7aa3d8155c962daf451dc824f4f60a11b65431df prosodyctl: Added the 'remove' command diff -r 7aa3d8155c96 -r cf0ae6eb74e6 prosodyctl --- a/prosodyctl Tue Jul 16 10:26:44 2019 -0700 +++ b/prosodyctl Tue Jul 16 10:34:13 2019 -0700 @@ -140,6 +140,19 @@ 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]]);