提交 f13b33b0 authored 作者: Michael Jerris's avatar Michael Jerris

make buildlib.sh more portable. This now uses find, instead of bash extensions…

make buildlib.sh more portable.  This now uses find, instead of bash extensions found in many versions of /bin/sh for comparing file dates.  Please report if this causes any issues.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3619 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 343a0c77
...@@ -20,6 +20,11 @@ if [ -z "$MAKE" ] ; then ...@@ -20,6 +20,11 @@ if [ -z "$MAKE" ] ; then
fi fi
fi fi
GZCAT=`which gzcat 2>/dev/null`
if [ -z "$GZCAT" ] ; then
GZCAT=zcat
fi
install= install=
base=http://svn.freeswitch.org/downloads/libs base=http://svn.freeswitch.org/downloads/libs
...@@ -52,15 +57,18 @@ else ...@@ -52,15 +57,18 @@ else
fi fi
fi fi
if [ ! -d $uncompressed ] ; then if [ ! -d $uncompressed ] ; then
tar -zxvf $tar $GZCAT $tar | tar xf -
fi fi
fi fi
if [ -f $uncompressed/.complete ] ; then
if [ ! -f $root/.nothanks ] && [ $uncompressed/.complete -ot $uncompressed ] ; then if [ ! -n "$(find $uncompressed/.complete -prune -newer $uncompressed)" ]; then
if [ ! -f $root/.nothanks ] ; then
echo remove stale .complete echo remove stale .complete
rm $uncompressed/.complete rm $uncompressed/.complete
sh -c "cd $uncompressed && $MAKE clean distclean" sh -c "cd $uncompressed && $MAKE clean distclean"
fi fi
fi
fi
if [ -f $uncompressed/.complete ] ; then if [ -f $uncompressed/.complete ] ; then
echo $uncompressed already installed echo $uncompressed already installed
...@@ -89,6 +97,7 @@ fi ...@@ -89,6 +97,7 @@ fi
if [ $? = 0 ] ; then if [ $? = 0 ] ; then
touch .complete touch .complete
touch .complete
else else
echo ERROR echo ERROR
exit 1 exit 1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论