subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1352032 - /subversion/trunk/get-deps.sh
Date Wed, 20 Jun 2012 10:13:59 GMT
Author: stsp
Date: Wed Jun 20 10:13:59 2012
New Revision: 1352032

URL: http://svn.apache.org/viewvc?rev=1352032&view=rev
Log:
* get-deps.sh: Don't unpack dependencies more than once.

Patch by: Daniel Richard G. <skunk@iSKUNK.ORG>
(submitted on users@, part of his post quoted below)

host:/tmp/subversion$ ./get-deps.sh
[script output elided]

host:/tmp/subversion$ find . -name apr_hash.c
./apr/tables/apr_hash.c

host:/tmp/subversion$ ./get-deps.sh
[script output elided]

host:/tmp/subversion$ find . -name apr_hash.c
./apr/apr-1.4.6/tables/apr_hash.c
./apr/tables/apr_hash.c

Re-running the script may be necessary in case some packages failed to
download the first time around (zlib in my case, as the current version
is now 1.2.7 instead of 1.2.6).

Modified:
    subversion/trunk/get-deps.sh

Modified: subversion/trunk/get-deps.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/get-deps.sh?rev=1352032&r1=1352031&r2=1352032&view=diff
==============================================================================
--- subversion/trunk/get-deps.sh (original)
+++ subversion/trunk/get-deps.sh Wed Jun 20 10:13:59 2012
@@ -55,18 +55,20 @@ usage() {
 # getters
 get_apr() {
     cd $TEMPDIR
-    $HTTP_FETCH $APACHE_MIRROR/apr/$APR.tar.bz2
-    $HTTP_FETCH $APACHE_MIRROR/apr/$APR_UTIL.tar.bz2
+    test -d $BASEDIR/apr      || $HTTP_FETCH $APACHE_MIRROR/apr/$APR.tar.bz2
+    test -d $BASEDIR/apr-util || $HTTP_FETCH $APACHE_MIRROR/apr/$APR_UTIL.tar.bz2
     cd $BASEDIR
 
-    bzip2 -dc $TEMPDIR/$APR.tar.bz2 | tar -xf -
-    bzip2 -dc $TEMPDIR/$APR_UTIL.tar.bz2 | tar -xf -
+    test -d $BASEDIR/apr      || bzip2 -dc $TEMPDIR/$APR.tar.bz2 | tar -xf -
+    test -d $BASEDIR/apr-util || bzip2 -dc $TEMPDIR/$APR_UTIL.tar.bz2 | tar -xf -
 
-    mv $APR apr
-    mv $APR_UTIL apr-util
+    test -d $BASEDIR/apr      || mv $APR apr
+    test -d $BASEDIR/apr-util || mv $APR_UTIL apr-util
 }
 
 get_serf() {
+    test -d $BASEDIR/serf && return
+
     cd $TEMPDIR
     $HTTP_FETCH http://serf.googlecode.com/files/$SERF.tar.bz2
     cd $BASEDIR
@@ -77,6 +79,8 @@ get_serf() {
 }
 
 get_zlib() {
+    test -d $BASEDIR/zlib && return
+
     cd $TEMPDIR
     $HTTP_FETCH http://www.zlib.net/$ZLIB.tar.bz2
     cd $BASEDIR
@@ -87,6 +91,8 @@ get_zlib() {
 }
 
 get_sqlite() {
+    test -d $BASEDIR/sqlite-amalgamation && return
+
     cd $TEMPDIR
     $HTTP_FETCH http://www.sqlite.org/$SQLITE.zip
     cd $BASEDIR



Mime
View raw message