From 4af3c3997c55fc0e1afc6cac160a7a0919b7e954 Mon Sep 17 00:00:00 2001
From: Jo?o Duarte <jvsDuarte08@gmail.com>
Date: Tue, 25 Jun 2019 13:20:54 +0100
Subject: util.prosodyctl: Moved the 'admin_operation' function from prosodyctl
 to here

---
 prosodyctl | 16 ----------------
 1 file changed, 16 deletions(-)

(limited to 'prosodyctl')

diff --git a/prosodyctl b/prosodyctl
index 75b36e34..05f711d7 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -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
-- 
cgit v1.2.3