提交 b61fc396 authored 作者: Anthony Minessale's avatar Anthony Minessale

add support for bz2 to getlibs

上级 f6dd557e
#!/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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论