mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
add new generated shell script for portable download/untar
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4588 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
37
build/getlib.sh.in
Executable file
37
build/getlib.sh.in
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
TAR=@TAR@
|
||||
ZCAT=@ZCAT@
|
||||
WGET=@WGET@
|
||||
CURL=@CURL@
|
||||
|
||||
if [ -f $WGET ] ; then
|
||||
DOWNLOAD_CMD=$WGET
|
||||
else
|
||||
if [ -f $CURL ] ; then
|
||||
DOWNLOAD_CMD="$CURL -O"
|
||||
fi
|
||||
fi
|
||||
|
||||
base=http://svn.freeswitch.org/downloads/libs
|
||||
tarfile=$1
|
||||
|
||||
if [ ! -d $tarfile ] ; then
|
||||
uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
|
||||
uncompressed=`echo $uncompressed | sed "s/\.tgz//g"`
|
||||
|
||||
if [ ! -f $tarfile ] ; then
|
||||
rm -fr $uncompressed
|
||||
$DOWNLOAD_CMD $base/$tarfile
|
||||
if [ ! -f $tarfile ] ; then
|
||||
echo cannot find $tarfile
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [ ! -d $uncompressed ] ; then
|
||||
$ZCAT -c -d $tarfile | $TAR xf -
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user