diff options
author | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-04 01:45:44 +0000 |
---|---|---|
committer | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-04 01:45:44 +0000 |
commit | 86567f791926dc213ef94204bd82004d0e4e8538 (patch) | |
tree | 1706f20f8b52976ebb76c6cea2f8a478ececfebb | |
parent | fda0ca7bd9d8eb96f684a842218677bcab16988f (diff) | |
download | luarocks-86567f791926dc213ef94204bd82004d0e4e8538.tar.gz luarocks-86567f791926dc213ef94204bd82004d0e4e8538.tar.bz2 luarocks-86567f791926dc213ef94204bd82004d0e4e8538.zip |
document wip
git-svn-id: http://luarocks.org/svn/luarocks/trunk@52 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
-rw-r--r-- | src/luarocks/add.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/luarocks/add.lua b/src/luarocks/add.lua index 457852be..66afe1f3 100644 --- a/src/luarocks/add.lua +++ b/src/luarocks/add.lua | |||
@@ -58,6 +58,7 @@ local function refresh_local_cache(server, user, password) | |||
58 | if user then login_info = " --user="..user end | 58 | if user then login_info = " --user="..user end |
59 | if password then login_info = login_info .. " --password="..password end | 59 | if password then login_info = login_info .. " --password="..password end |
60 | 60 | ||
61 | -- TODO abstract away explicit 'wget' call | ||
61 | fs.execute("wget -q -m -nd "..protocol.."://"..server_path..login_info) | 62 | fs.execute("wget -q -m -nd "..protocol.."://"..server_path..login_info) |
62 | return local_cache, protocol, server_path, user, password | 63 | return local_cache, protocol, server_path, user, password |
63 | end | 64 | end |
@@ -90,6 +91,8 @@ local function add_file_to_server(refresh, rockfile, server) | |||
90 | if not server_path:match("/$") then | 91 | if not server_path:match("/$") then |
91 | server_path = server_path .. "/" | 92 | server_path = server_path .. "/" |
92 | end | 93 | end |
94 | |||
95 | -- TODO abstract away explicit 'curl' call | ||
93 | fs.execute("curl "..login_info.." -T '{manifest,index.html,"..dir.base_name(rockfile).."}' "..protocol.."://"..server_path) | 96 | fs.execute("curl "..login_info.." -T '{manifest,index.html,"..dir.base_name(rockfile).."}' "..protocol.."://"..server_path) |
94 | 97 | ||
95 | return true | 98 | return true |