[svn-commits] sruffell: branch linux/2.4 r9677 - /linux/branches/2.4/build_tools/live_dahdi

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jan 20 23:30:51 CST 2011


Author: sruffell
Date: Thu Jan 20 23:30:47 2011
New Revision: 9677

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9677
Log:
live_dahdi: only check for TOOLS_DIR when used

Only check that TOOLD_DIR is valid when it is actually needed (configure,
install, config). This allows not checking for it with *load on a
rsync-ed copy.

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9479

Modified:
    linux/branches/2.4/build_tools/live_dahdi

Modified: linux/branches/2.4/build_tools/live_dahdi
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.4/build_tools/live_dahdi?view=diff&rev=9677&r1=9676&r2=9677
==============================================================================
--- linux/branches/2.4/build_tools/live_dahdi (original)
+++ linux/branches/2.4/build_tools/live_dahdi Thu Jan 20 23:30:47 2011
@@ -29,13 +29,16 @@
 	exit 1
 fi
 
-if [ ! -d "$TOOLS_DIR" ]; then
-	echo >&2 "$0:dahdi-tools dir '$TOOLS_DIR' does not exits.  Aborting".
-	exit 1
-fi
 set -e
 LINUX_DIR_FULL=`(cd $LINUX_DIR; pwd)`
-TOOLS_DIR_FULL=`(cd $TOOLS_DIR; pwd)`
+
+set_tools_dir() {
+	if [ ! -d "$TOOLS_DIR" ]; then
+		echo >&2 "$0:dahdi-tools dir '$TOOLS_DIR' does not exits.  Aborting".
+		exit 1
+	fi
+	TOOLS_DIR_FULL=`(cd $TOOLS_DIR; pwd)`
+}
 
 # Give priority to our installed binaries:
 PATH=$DESTDIR/sbin:$DESTDIR/usr/sbin:$PATH
@@ -227,15 +230,18 @@
 case "$1" in
 configure)
 	shift
+	set_tools_dir
 	cd "$TOOLS_DIR"; ./configure --with-dahdi="$LINUX_DIR_FULL" "$@"
 	;;
 install)
 	shift
+	set_tools_dir
 	cd "$LINUX_DIR"; make install DESTDIR=$DESTDIR "$@"
 	cd "$TOOLS_DIR_FULL"; make install DESTDIR=$DESTDIR DYNFS=yes "$@"
 	;;
 config)
 	shift
+	set_tools_dir
 	cd "$TOOLS_DIR"; make config DESTDIR=$DESTDIR "$@"
 	mkdir -p $DESTDIR/etc/asterisk
 	cat >"$FIRMWARE_DIR/live-init.conf" <<EOF




More information about the svn-commits mailing list