r2741 - jhalfs/trunk/common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Thu Jun 1 14:08:50 PDT 2006


Author: manuel
Date: 2006-06-01 15:08:49 -0600 (Thu, 01 Jun 2006)
New Revision: 2741

Modified:
   jhalfs/trunk/common/progress_bar.sh
Log:
Avoided recursion in progress_bar.sh.
The make PID test need be fixed yet.

Modified: jhalfs/trunk/common/progress_bar.sh
===================================================================
--- jhalfs/trunk/common/progress_bar.sh	2006-06-01 20:49:41 UTC (rev 2740)
+++ jhalfs/trunk/common/progress_bar.sh	2006-06-01 21:08:49 UTC (rev 2741)
@@ -4,10 +4,12 @@
 
 set -e
 
+[[ -z $1 ]] && exit
+[[ -z $2 ]] && exit
+
 if [ ! -f $1 ] ; then
-  echo -n "."
-  sleep 1
-  if [ -d /proc/$2 ] ; then
-    ./$0 $1 $2
-  fi
+  while [ -d /proc/$2 ] ; do
+    echo -n "$2 "
+    sleep 1
+  done
 fi




More information about the alfs-log mailing list