download.pl: use curl in preference to wget
authorBrian J. Murrell <brian@interlinx.bc.ca>
Sun, 20 Nov 2016 21:01:33 +0000 (16:01 -0500)
committerJo-Philipp Wich <jo@mein.io>
Tue, 3 Jan 2017 13:26:41 +0000 (14:26 +0100)
commitfc6b6f45831e1a2afc95ac241416acbd103fd442
treed8d9a187a96adc5326701e7e25011112f8363266
parent558680012dd79de0289aeeb74a72163916cd9f33
download.pl: use curl in preference to wget

Because wget doesn't know how to do Negotiate authentication with a proxy
and curl does, use curl if it's present. The user is expected to have a
~/.curlrc that sets the options necessary for any proxy authentication.

A ~/.curlrc is completely optional however and curl will work in exactly
the same manner as wget without one.

Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
[Jo-Philipp Wich: Rework code to detect curl usability by checking --version,
                  Use vararg style open() to bypass the shell when downloading,
                  Use Text::ParseWords to decompose env vars into arguments]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
scripts/download.pl