diff options
author | João Duarte <jvsDuarte08@gmail.com> | 2019-07-16 10:34:13 -0700 |
---|---|---|
committer | João Duarte <jvsDuarte08@gmail.com> | 2019-07-16 10:34:13 -0700 |
commit | 5b190cf27618c048a69021dae3415727a50630e9 (patch) | |
tree | 1f7f0dac1f5224e82c08ba5295f0128793e956cb /prosodyctl | |
parent | 8fa4d6e25003773649665a5c9d4924b723a21fb0 (diff) | |
download | prosody-5b190cf27618c048a69021dae3415727a50630e9.tar.gz prosody-5b190cf27618c048a69021dae3415727a50630e9.zip |
prosodyctl: Added the 'remove' command
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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]]); |