[PATCH] Use the default PATH to find the curl executable.
Francois Tigeot
ftigeot at wolfpond.org
Sat Mar 26 15:25:40 PDT 2011
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 .
---
download | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/download b/download
index 578f26d..f325c4c 100755
--- a/download
+++ b/download
@@ -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
--
1.7.3.4
--lrZ03NoBR/3+SXJZ--
More information about the LibreOffice
mailing list