[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [patch] buildcross trivial cleanup



misc trivia for em_build and related scripts:

	* conf_vars.sh: Let user specify FORCE_REBUILD
	* em_version.sh: Make check for equality of versions more
	robust.
	* em_build.sh: Test integers with integer ops.
	Fix test for FORCE_REBUILD (has to be a string comparison).

Please consider applying, TIA and cheers,
Index: buildcross/branch/conf_vars.sh
===================================================================
--- buildcross/branch/conf_vars.sh	(revision 3261)
+++ buildcross/branch/conf_vars.sh	(working copy)
@@ -10,5 +10,5 @@
 LOGPATH=./logs/
 MIRROR=${MIRROR:="http://ftp.uk.debian.org/debian"}
 ROOTCMD=sudo
-FORCE_REBUILD=no
+FORCE_REBUILD=${FORCE_REBUILD:="no"}
 REPRO_CONF="/var/emdebian/debian"
Index: buildcross/branch/em_version.sh
===================================================================
--- buildcross/branch/em_version.sh	(revision 3261)
+++ buildcross/branch/em_version.sh	(working copy)
@@ -31,7 +31,7 @@
 if [ -n $EM_VERSION ]; then
 	echo "FLAG: 1"
 	echo "$ARCH $PKG - out sync"
-elif [ $DEB_VERSION == $EM_VERSION ]; then
+elif [ "x$DEB_VERSION" == "x$EM_VERSION" ]; then
 # Compares both versions
 	echo "FLAG: 0"
 	echo "$ARCH $PKG - in sync"
Index: buildcross/branch/em_build.sh
===================================================================
--- buildcross/branch/em_build.sh	(revision 3261)
+++ buildcross/branch/em_build.sh	(working copy)
@@ -10,12 +10,12 @@
 echo "Compare debian vs emdebian versions: em_version.sh"
 FLAG=`./em_version.sh $PKG 2> /dev/null | grep ^FLAG: | sed -e 's/FLAG: //g'`
 
-if [ $FLAG == 0 ]; then
-	if [ ${FORCE_REBUILD} eq yes  ]; then
+if [ $FLAG -eq 0 ]; then
+	if [ "x$FORCE_REBUILD" == "xyes"  ]; then
 		./em_cross.sh $PKG $ARCH
 	fi
 	./em_log.sh $PKG $ARCH
-elif [ $FLAG == 1 ]; then
+elif [ $FLAG -eq 1 ]; then
 	echo "Needs to trigger buildcross: em_cross.sh"
 	./em_cross.sh $PKG $ARCH
 	./em_log.sh $PKG $ARCH

Reply to: