You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/06/20 12:13:59 UTC

svn commit: r1352032 - /subversion/trunk/get-deps.sh

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. <sk...@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