]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make buildlib.sh more portable. This now uses find, instead of bash extensions found...
authorMichael Jerris <mike@jerris.com>
Tue, 12 Dec 2006 16:38:46 +0000 (16:38 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 12 Dec 2006 16:38:46 +0000 (16:38 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3619 d0543943-73ff-0310-b7d9-9358b9ac24b2

build/buildlib.sh

index 5092bff5f58588b3464fcaabd4b6010b8b0d5452..b81155c31309195f06eb1f772dc188bcfe7addef 100755 (executable)
@@ -20,6 +20,11 @@ if [ -z "$MAKE" ] ; then
     fi
 fi
 
+GZCAT=`which gzcat 2>/dev/null`
+if [ -z "$GZCAT" ] ; then
+    GZCAT=zcat
+fi
+
 install=
 base=http://svn.freeswitch.org/downloads/libs
 
@@ -52,15 +57,18 @@ else
        fi
     fi
     if [ ! -d $uncompressed ] ; then
-       tar -zxvf $tar
+       $GZCAT $tar | tar xf -
     fi
 fi
-
-if [ ! -f $root/.nothanks ] && [ $uncompressed/.complete -ot $uncompressed ] ; then 
+if [ -f $uncompressed/.complete ] ; then 
+if [ ! -n "$(find $uncompressed/.complete -prune -newer $uncompressed)" ]; then
+if [ ! -f $root/.nothanks ] ; then 
     echo remove stale .complete
     rm $uncompressed/.complete
     sh -c "cd $uncompressed && $MAKE clean distclean"
 fi
+fi
+fi
 
 if [ -f $uncompressed/.complete ] ; then
     echo $uncompressed already installed
@@ -89,6 +97,7 @@ fi
 
 if [ $? = 0 ] ; then
     touch .complete
+    touch .complete
 else 
     echo ERROR
     exit 1