diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-11-07 23:44:15 -0600 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-11-07 23:44:15 -0600 |
commit | 36c872b96fb4335078558cec78075d2c332114ea (patch) | |
tree | 98b92afeb051b171bf6444edb4f879c036f92e8d /wget.patch | |
parent | 5b1bef8221d93e85260bfd394625ebd3d3202ae4 (diff) | |
download | luarocks-packaging-36c872b96fb4335078558cec78075d2c332114ea.tar.gz luarocks-packaging-36c872b96fb4335078558cec78075d2c332114ea.tar.bz2 luarocks-packaging-36c872b96fb4335078558cec78075d2c332114ea.zip |
Patch wget to use short options
Diffstat (limited to '')
-rw-r--r-- | wget.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/wget.patch b/wget.patch new file mode 100644 index 0000000..11d46d4 --- /dev/null +++ b/wget.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | --- a/src/luarocks/fs/tools.lua | ||
2 | +++ b/src/luarocks/fs/tools.lua | ||
3 | @@ -153,6 +153,7 @@ end | ||
4 | function tools.use_downloader(url, filename, cache) | ||
5 | assert(type(url) == "string") | ||
6 | assert(type(filename) == "string" or not filename) | ||
7 | + cache = false | ||
8 | |||
9 | filename = fs.absolute_name(filename or dir.base_name(url)) | ||
10 | |||
11 | @@ -163,7 +164,7 @@ function tools.use_downloader(url, filename, cache) | ||
12 | |||
13 | local ok = false | ||
14 | if downloader == "wget" then | ||
15 | - local wget_cmd = vars.WGET.." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet " | ||
16 | + local wget_cmd = vars.WGET.." "..vars.WGETNOCERTFLAG.." -U \""..cfg.user_agent.." via wget\" -q " | ||
17 | if cfg.connection_timeout and cfg.connection_timeout > 0 then | ||
18 | wget_cmd = wget_cmd .. "--timeout="..tostring(cfg.connection_timeout).." --tries=1 " | ||
19 | end | ||
20 | @@ -175,7 +176,7 @@ function tools.use_downloader(url, filename, cache) | ||
21 | ok = fs.execute_quiet(wget_cmd.." --timestamping ", url) | ||
22 | fs.pop_dir() | ||
23 | elseif filename then | ||
24 | - ok = fs.execute_quiet(wget_cmd.." --output-document ", filename, url) | ||
25 | + ok = fs.execute_quiet(wget_cmd.." -O", filename, url) | ||
26 | else | ||
27 | ok = fs.execute_quiet(wget_cmd, url) | ||
28 | end | ||
29 | |||