Author: mikej Date: Tue Dec 12 11:38:46 2006 New Revision: 3619 Modified: freeswitch/trunk/build/buildlib.sh Log: 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. Modified: freeswitch/trunk/build/buildlib.sh ============================================================================== --- freeswitch/trunk/build/buildlib.sh (original) +++ freeswitch/trunk/build/buildlib.sh Tue Dec 12 11:38:46 2006 @@ -20,6 +20,11 @@ fi fi +GZCAT=`which gzcat 2>/dev/null` +if [ -z "$GZCAT" ] ; then + GZCAT=zcat +fi + install= base=http://svn.freeswitch.org/downloads/libs @@ -52,15 +57,18 @@ fi fi if [ ! -d $uncompressed ] ; then - tar -zxvf $tar + $GZCAT $tar | tar xf - fi fi - -if [ ! -f $root/.nothanks ] && [ $uncompressed/.complete -ot $uncompressed ] ; then +if [ -f $uncompressed/.complete ] ; then +if [ ! -n "$(find $uncompressed/.complete -prune -newer $uncompressed)" ]; then +if [ ! -f $root/.nothanks ] ; then echo remove stale .complete rm $uncompressed/.complete sh -c "cd $uncompressed && $MAKE clean distclean" fi +fi +fi if [ -f $uncompressed/.complete ] ; then echo $uncompressed already installed @@ -88,6 +96,7 @@ fi if [ $? = 0 ] ; then + touch .complete touch .complete else echo ERROR