mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-16 20:02:47 +00:00
add support for bz2 to getlibs
This commit is contained in:
parent
f6dd557e5d
commit
b61fc39622
@ -1,5 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
bz="false"
|
||||||
|
|
||||||
|
BUNZUP=/usr/bin/bunzip2
|
||||||
TAR=@TAR@
|
TAR=@TAR@
|
||||||
ZCAT=@ZCAT@
|
ZCAT=@ZCAT@
|
||||||
WGET=@WGET@
|
WGET=@WGET@
|
||||||
@ -17,14 +20,26 @@ base=http://files.freeswitch.org/downloads/libs/
|
|||||||
tarfile=$1
|
tarfile=$1
|
||||||
url=`echo $tarfile | grep "://"`
|
url=`echo $tarfile | grep "://"`
|
||||||
|
|
||||||
|
if [ `echo $tarfile | grep bz2` ] ; then
|
||||||
|
bz="true"
|
||||||
|
UNZIPPER=$BUNZIP
|
||||||
|
else
|
||||||
|
UNZIPPER=$ZCAT
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -z $url ] ; then
|
if [ ! -z $url ] ; then
|
||||||
base=$tarfile/
|
base=$tarfile/
|
||||||
tarfile=$2
|
tarfile=$2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d $tarfile ] ; then
|
if [ ! -d $tarfile ] ; then
|
||||||
|
|
||||||
|
if [ $bz = "true" ] ; then
|
||||||
|
uncompressed=`echo $tarfile | sed "s/\.tar\.bz2//g"`
|
||||||
|
else
|
||||||
uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
|
uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
|
||||||
uncompressed=`echo $uncompressed | sed "s/\.tgz//g"`
|
uncompressed=`echo $uncompressed | sed "s/\.tgz//g"`
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f $tarfile ] ; then
|
if [ ! -f $tarfile ] ; then
|
||||||
rm -fr $uncompressed
|
rm -fr $uncompressed
|
||||||
@ -35,7 +50,7 @@ if [ ! -d $tarfile ] ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -d $uncompressed ] ; then
|
if [ ! -d $uncompressed ] ; then
|
||||||
$ZCAT -c -d $tarfile | $TAR xf -
|
$UNZIPPER -c -d $tarfile | $TAR xf -
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user