diff options
author | João Duarte <jvsDuarte08@gmail.com> | 2019-06-25 13:20:54 +0100 |
---|---|---|
committer | João Duarte <jvsDuarte08@gmail.com> | 2019-06-25 13:20:54 +0100 |
commit | 122bde2f2c4816e89bd02be36e0e9f1ee31f7557 (patch) | |
tree | a3382cb39e44819e43e4e85f1b0889275c6a2211 /prosodyctl | |
parent | 2aa2aff974345346344416ca1f91f0c5190dd93b (diff) | |
download | prosody-122bde2f2c4816e89bd02be36e0e9f1ee31f7557.tar.gz prosody-122bde2f2c4816e89bd02be36e0e9f1ee31f7557.zip |
util.prosodyctl: Moved the 'admin_operation' function from prosodyctl to here
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -98,22 +98,6 @@ function commands.list(arg) end end -function admin_operation(operation, arg) - local modules, tree, server, refresh = "", "", "", "" - for i, _ in ipairs(arg) do - if arg[i]:sub(1, #"--tree=") == "--tree=" then - tree = arg[i].." " - elseif arg[i]:sub(1, #"--server=") == "--server=" then - server = arg[i].." " - elseif arg[i]:sub(1, #"--no-refresh") == "--no-refresh" then - refresh = arg[i].." " - else - modules=modules..arg[i].." " - end - end - os.execute("luarocks-admin "..tree..operation..server..refresh..modules) -end - function commands.admin_add(arg) admin_operation("add ", arg) end |