subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1139602 - /subversion/trunk/get-deps.sh
Date Sat, 25 Jun 2011 19:45:02 GMT
Author: danielsh
Date: Sat Jun 25 19:45:02 2011
New Revision: 1139602

URL: http://svn.apache.org/viewvc?rev=1139602&view=rev
Log:
* get-deps.sh: Try curl and fetch if wget is not available.

Modified:
    subversion/trunk/get-deps.sh

Modified: subversion/trunk/get-deps.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/get-deps.sh?rev=1139602&r1=1139601&r2=1139602&view=diff
==============================================================================
--- subversion/trunk/get-deps.sh (original)
+++ subversion/trunk/get-deps.sh Sat Jun 25 19:45:02 2011
@@ -37,14 +37,19 @@ APR_ICONV=apr-iconv-1.2.1
 BASEDIR=`pwd`
 TEMPDIR=$BASEDIR/temp
 
+HTTP_FETCH=
+[ -z "$HTTP_FETCH" ] && type wget >/dev/null 2>&1 && HTTP_FETCH="wget
-nc"
+[ -z "$HTTP_FETCH" ] && type wget >/dev/null 2>&1 && HTTP_FETCH="curl
-O"
+[ -z "$HTTP_FETCH" ] && type wget >/dev/null 2>&1 && HTTP_FETCH="fetch"
+
 # Need this uncommented if any of the specific versions of the ASF tarballs to
 # be downloaded are no longer available on the general mirrors.
 APACHE_MIRROR=http://archive.apache.org/dist
 
 get_apr() {
     cd $TEMPDIR
-    wget -nc $APACHE_MIRROR/apr/$APR.tar.bz2
-    wget -nc $APACHE_MIRROR/apr/$APR_UTIL.tar.bz2
+    $HTTP_FETCH $APACHE_MIRROR/apr/$APR.tar.bz2
+    $HTTP_FETCH $APACHE_MIRROR/apr/$APR_UTIL.tar.bz2
     cd $BASEDIR
 
     bzip2 -dc $TEMPDIR/$APR.tar.bz2 | tar -xf -
@@ -56,7 +61,7 @@ get_apr() {
 
 get_neon() {
     cd $TEMPDIR
-    wget -nc http://webdav.org/neon/$NEON.tar.gz
+    $HTTP_FETCH http://webdav.org/neon/$NEON.tar.gz
     cd $BASEDIR
 
     gzip  -dc $TEMPDIR/$NEON.tar.gz | tar -xf -
@@ -66,7 +71,7 @@ get_neon() {
 
 get_serf() {
     cd $TEMPDIR
-    wget -nc http://serf.googlecode.com/files/$SERF.tar.bz2
+    $HTTP_FETCH http://serf.googlecode.com/files/$SERF.tar.bz2
     cd $BASEDIR
 
     bzip2 -dc $TEMPDIR/$SERF.tar.bz2 | tar -xf -
@@ -76,7 +81,7 @@ get_serf() {
 
 get_zlib() {
     cd $TEMPDIR
-    wget -nc http://www.zlib.net/$ZLIB.tar.bz2
+    $HTTP_FETCH http://www.zlib.net/$ZLIB.tar.bz2
     cd $BASEDIR
 
     bzip2 -dc $TEMPDIR/$ZLIB.tar.bz2 | tar -xf -
@@ -86,7 +91,7 @@ get_zlib() {
 
 get_sqlite() {
     cd $TEMPDIR
-    wget -nc http://www.sqlite.org/$SQLITE.zip
+    $HTTP_FETCH http://www.sqlite.org/$SQLITE.zip
     cd $BASEDIR
 
     unzip -q $TEMPDIR/$SQLITE.zip



Mime
View raw message