Project "FreeSWITCH Source" received a push.

branch: master updated

       via: b61fc39622ce76067852f142dcc5ec53a56c1c30 (commit)
      from: f6dd557e5db9dacede48d26c98aee639378612f9 (commit)


= COMMIT LOG ===========================================================
committer: Anthony Minessale
comments: 
add support for bz2 to getlibs

diff --git a/build/getlib.sh.in b/build/getlib.sh.in
index ebad7b5..a42fe3a 100755
--- a/build/getlib.sh.in
+++ b/build/getlib.sh.in
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+bz="false"
+
+BUNZUP=/usr/bin/bunzip2
 TAR=@TAR@
 ZCAT=@ZCAT@
 WGET=@WGET@
@@ -17,14 +20,26 @@ base=http://files.freeswitch.org/downloads/libs/
 tarfile=$1
 url=`echo $tarfile | grep "://"`
 
+if [ `echo $tarfile | grep bz2`  ] ; then
+    bz="true"
+    UNZIPPER=$BUNZIP
+else
+    UNZIPPER=$ZCAT
+fi
+
 if [ ! -z $url ] ; then
     base=$tarfile/
     tarfile=$2
 fi
 
 if [ ! -d $tarfile ] ; then
-    uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
-    uncompressed=`echo $uncompressed | sed "s/\.tgz//g"`
+
+    if [ $bz = "true" ] ; then
+	uncompressed=`echo $tarfile | sed "s/\.tar\.bz2//g"`
+    else 
+	uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
+	uncompressed=`echo $uncompressed | sed "s/\.tgz//g"`
+    fi
 
     if [ ! -f $tarfile ] ; then
 	rm -fr $uncompressed
@@ -35,7 +50,7 @@ if [ ! -d $tarfile ] ; then
 	fi
     fi
     if [ ! -d $uncompressed ] ; then
-	$ZCAT -c -d $tarfile | $TAR xf -
+	$UNZIPPER -c -d $tarfile | $TAR xf -
     fi
 fi
 
========================================================================

Summary of changes:
 build/getlib.sh.in |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email
For more info, see http://blog.chomperstomp.com/?p=630 --
FreeSWITCH Source