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).

A proposed patch against SVN is attached. (It also bumps the zlib
version, as that is needed anyway.)


--Daniel

(Please Cc: any replies to me, as I am not subscribed to this list.)


-- 
Daniel Richard G. || sk...@iskunk.org
My ASCII-art .sig got a bad case of Times New Roman.
Index: get-deps.sh
===================================================================
--- get-deps.sh	(revision 1351781)
+++ get-deps.sh	(working copy)
@@ -26,7 +26,7 @@
 APR=apr-1.4.6
 APR_UTIL=apr-util-1.4.1
 SERF=serf-1.0.1
-ZLIB=zlib-1.2.6
+ZLIB=zlib-1.2.7
 SQLITE_VERSION=3.7.12
 SQLITE=sqlite-amalgamation-$(printf %u%02u%02u%02u $(echo $SQLITE_VERSION | sed -e "s/\./ /g"))
 
@@ -55,18 +55,20 @@
 # 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_zlib() {
+    test -d $BASEDIR/zlib && return
+
     cd $TEMPDIR
     $HTTP_FETCH http://www.zlib.net/$ZLIB.tar.bz2
     cd $BASEDIR
@@ -87,6 +91,8 @@
 }
 
 get_sqlite() {
+    test -d $BASEDIR/sqlite-amalgamation && return
+
     cd $TEMPDIR
     $HTTP_FETCH http://www.sqlite.org/$SQLITE.zip
     cd $BASEDIR

Reply via email to