diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2010-09-23 01:42:50 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2010-09-23 01:42:50 -0300 |
| commit | d051ad5a21b653dbc5845900b5c4e734d92073c1 (patch) | |
| tree | 289534f6c9cd702791a3bdaa66763bfc0c38df80 /src | |
| parent | a59bb05fa5c17d9f2b1f94c4fb7c10985675108d (diff) | |
| download | luarocks-d051ad5a21b653dbc5845900b5c4e734d92073c1.tar.gz luarocks-d051ad5a21b653dbc5845900b5c4e734d92073c1.tar.bz2 luarocks-d051ad5a21b653dbc5845900b5c4e734d92073c1.zip | |
Enable luarocks-admin remove
Diffstat (limited to 'src')
| -rwxr-xr-x | src/bin/luarocks-admin | 1 | ||||
| -rw-r--r-- | src/luarocks/add.lua | 2 | ||||
| -rw-r--r-- | src/luarocks/admin_remove.lua | 2 |
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 = { | |||
| 11 | commands.help = require("luarocks.help") | 11 | commands.help = require("luarocks.help") |
| 12 | commands.make_manifest = require("luarocks.make_manifest") | 12 | commands.make_manifest = require("luarocks.make_manifest") |
| 13 | commands.add = require("luarocks.add") | 13 | commands.add = require("luarocks.add") |
| 14 | commands.remove = require("luarocks.admin_remove") | ||
| 14 | commands.refresh_cache = require("luarocks.refresh_cache") | 15 | commands.refresh_cache = require("luarocks.refresh_cache") |
| 15 | 16 | ||
| 16 | command_line.run_command(...) | 17 | command_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) |
