r3333 - jhalfs/trunk/common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Mar 18 02:46:24 PDT 2007


Author: manuel
Date: 2007-03-18 03:46:24 -0600 (Sun, 18 Mar 2007)
New Revision: 3333

Modified:
   jhalfs/trunk/common/progress_bar.sh
Log:
Fix segfault on tools stripping phase.

Modified: jhalfs/trunk/common/progress_bar.sh
===================================================================
--- jhalfs/trunk/common/progress_bar.sh	2007-03-05 18:50:46 UTC (rev 3332)
+++ jhalfs/trunk/common/progress_bar.sh	2007-03-18 09:46:24 UTC (rev 3333)
@@ -23,6 +23,13 @@
 declare -i  SEC=0  # Seconds accumulator
 declare -i  PREV_SEC=0
 
+# Prevent segfault on stripping phases
+if [[ "$SHELL" = "/bin/bash" ]] ; then
+  SLEEP=/bin/sleep
+else
+  SLEEP=/tools/bin/sleep
+fi
+
 write_or_exit() {
     # make has been killed or failed or run to completion, leave
   [[ ! -e /proc/${MAKE_PPID} ]] && echo -n "${CURSOR_ON}" && exit
@@ -43,7 +50,7 @@
       # Loop through the animation string
     for GRAPHIC_CHAR in ${GRAPHIC_STR} ; do
       write_or_exit "${CSI}$((SEC + 3))G${GRAPHIC_CHAR}"
-      sleep .12 # This value MUST be less than .2 seconds.
+      $SLEEP .12 # This value MUST be less than .2 seconds.
     done
 
       # A BASH internal variable, the number of seconds the script




More information about the alfs-log mailing list