PERFORCE change 81492 for review

soc-saturnero soc-saturnero at FreeBSD.org
Fri Aug 5 13:53:40 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=81492

Change 81492 by soc-saturnero at soc-saturnero_sberta on 2005/08/05 13:53:20

	- Remove ${LOGFILE} if it's a temporary file
	- Use return instead of exit, if exiting cleanly

Affected files ...

.. //depot/projects/soc2005/freesbie/scripts/buildkernel.sh#3 edit
.. //depot/projects/soc2005/freesbie/scripts/buildworld.sh#4 edit
.. //depot/projects/soc2005/freesbie/scripts/launch.sh#6 edit

Differences ...

==== //depot/projects/soc2005/freesbie/scripts/buildkernel.sh#3 (text+ko) ====

@@ -16,7 +16,7 @@
 
 if [ -n "${NO_BUILDKERNEL:-}" ]; then
     echo "NO_BUILDKERNEL set, skipping build" | tee -a ${LOGFILE}
-    exit
+    return
 fi
 
 # Set MAKE_CONF variable if it's not already set.

==== //depot/projects/soc2005/freesbie/scripts/buildworld.sh#4 (text+ko) ====

@@ -16,7 +16,7 @@
 
 if [ -n "${NO_BUILDWORLD:-}" ]; then
     echo "NO_BUILDWORLD set, skipping build" | tee -a ${LOGFILE}
-    exit
+    return
 fi
 
 # Set MAKE_CONF variable if it's not already set.

==== //depot/projects/soc2005/freesbie/scripts/launch.sh#6 (text+ko) ====

@@ -25,10 +25,14 @@
 
 TARGET=$1;
 shift;
+
+# Set LOGFILE. If it's a tmp file, schedule for deletion
 if [ -n "${1:-}" ]; then
     LOGFILE=${LOCALDIR}/$1
+    REMOVELOG=0
 else
     LOGFILE=$(mktemp -q /tmp/freesbie.XXXXXX)
+    REMOVELOG=1
 fi
 
 . ./conf/freesbie.defaults.conf
@@ -56,3 +60,7 @@
 elif [ -f "${LOCALDIR}/scripts/${TARGET}.sh" ]; then
     . ${LOCALDIR}/scripts/${TARGET}.sh
 fi
+
+if [ ${REMOVELOG} -eq 1 ]; then
+    rm -f ${LOGFILE}
+fi


More information about the p4-projects mailing list