diff options
author | Francois Tigeot <ftigeot@wolfpond.org> | 2011-03-26 23:25:40 +0100 |
---|---|---|
committer | Francois Tigeot <ftigeot@wolfpond.org> | 2011-04-03 15:15:32 +0200 |
commit | 132c52c44a1b7b339c1e23858c2ea646d9b31acd (patch) | |
tree | 74e646734cc0ddb3f05c4d46f66ed95cb6fae1d4 /download | |
parent | c462e933f8e9369857b4f7bf58549a85b865e914 (diff) |
Use the default PATH to find the curl executable.
The previous code was trying to pick up the full curl path in a harcoded
list of places and actually failed to locate binaries on some hosts, even
though they were present in $PATH .
Diffstat (limited to 'download')
-rwxr-xr-x | download | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -66,7 +66,7 @@ fi # check for wget and md5sum wget= md5sum= -curl= +curl=`which curl` for i in wget /usr/bin/wget /usr/local/bin/wget /usr/sfw/bin/wget /opt/sfw/bin/wget /opt/local/bin/wget; do eval "$i --version" > /dev/null 2>&1 @@ -77,19 +77,6 @@ for i in wget /usr/bin/wget /usr/local/bin/wget /usr/sfw/bin/wget /opt/sfw/bin/w fi done -if [ -z "$wget" ]; then - for i in curl /usr/bin/curl /usr/local/bin/curl /usr/sfw/bin/curl /opt/sfw/bin/curl /opt/local/bin/curl; do - # mac curl returns "2" on --version - # eval "$i --version" > /dev/null 2>&1 - # ret=$? - # if [ $ret -eq 0 ]; then - if [ -x $i ]; then - curl=$i - break - fi - done -fi - if [ -z "$wget" -a -z "$curl" ]; then echo "ERROR: neither wget nor curl found!" exit 1 |