aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/bin/luarocks-admin1
-rw-r--r--src/luarocks/add.lua2
-rw-r--r--src/luarocks/admin_remove.lua2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/luarocks-admin b/src/bin/luarocks-admin
index 6e528cd9..69814459 100755
--- a/src/bin/luarocks-admin
+++ b/src/bin/luarocks-admin
@@ -11,6 +11,7 @@ commands = {
11commands.help = require("luarocks.help") 11commands.help = require("luarocks.help")
12commands.make_manifest = require("luarocks.make_manifest") 12commands.make_manifest = require("luarocks.make_manifest")
13commands.add = require("luarocks.add") 13commands.add = require("luarocks.add")
14commands.remove = require("luarocks.admin_remove")
14commands.refresh_cache = require("luarocks.refresh_cache") 15commands.refresh_cache = require("luarocks.refresh_cache")
15 16
16command_line.run_command(...) 17command_line.run_command(...)
diff --git a/src/luarocks/add.lua b/src/luarocks/add.lua
index 61d44665..a6dc4531 100644
--- a/src/luarocks/add.lua
+++ b/src/luarocks/add.lua
@@ -91,7 +91,7 @@ local function add_files_to_server(refresh, rockfiles, server, upload_server)
91 -- TODO abstract away explicit 'curl' call 91 -- TODO abstract away explicit 'curl' call
92 92
93 local cmd 93 local cmd
94 if upload_server and upload_server.rsync then 94 if protocol == "rsync" then
95 local srv, path = server_path:match("([^/]+)(/.+)") 95 local srv, path = server_path:match("([^/]+)(/.+)")
96 cmd = "rsync -Oavz -e ssh "..local_cache.."/ "..user.."@"..srv..":"..path.."/" 96 cmd = "rsync -Oavz -e ssh "..local_cache.."/ "..user.."@"..srv..":"..path.."/"
97 elseif upload_server and upload_server.sftp then 97 elseif upload_server and upload_server.sftp then
diff --git a/src/luarocks/admin_remove.lua b/src/luarocks/admin_remove.lua
index 1b1f845c..99852e36 100644
--- a/src/luarocks/admin_remove.lua
+++ b/src/luarocks/admin_remove.lua
@@ -74,7 +74,7 @@ local function remove_files_from_server(refresh, rockfiles, server, upload_serve
74 index.make_index(local_cache) 74 index.make_index(local_cache)
75 75
76 local srv, path = server_path:match("([^/]+)(/.+)") 76 local srv, path = server_path:match("([^/]+)(/.+)")
77 local cmd = "rsync -Oavz -e ssh "..local_cache.."/ "..user.."@"..srv..":"..path.."/" 77 local cmd = "rsync -Oavz --delete -e ssh "..local_cache.."/ "..user.."@"..srv..":"..path.."/"
78 78
79 print(cmd) 79 print(cmd)
80 fs.execute(cmd) 80 fs.execute(cmd)