changeset 773:2b9e8af90917

Remove wait4background, the shell has a builtin "wait" and we don't care about non-zero wait counts anymore.
author Rob Landley <rob@landley.net>
date Wed, 01 Jul 2009 18:53:00 -0500
parents 7cb6ef2cdf10
children 0d83b2530f6d
files buildall.sh sources/functions.sh system-image.sh
diffstat 3 files changed, 9 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/buildall.sh	Wed Jul 01 18:02:44 2009 -0500
+++ b/buildall.sh	Wed Jul 01 18:53:00 2009 -0500
@@ -51,7 +51,7 @@
     doforklog ./cross-compiler.sh $i
 done
 
-wait4background
+wait
 
 # Should we do the static compilers via canadian cross?
 
@@ -74,7 +74,7 @@
       STAGE_NAME=cross-static doforklog ./root-filesystem.sh $i 
   done
 
-  wait4background
+  wait
 
   # Replace the dynamic cross compilers with the static ones, and tar 'em up.
 
@@ -88,7 +88,7 @@
     doforklog tar cjfC build/cross-compiler-$i.tar.bz2 build cross-compiler-$i
   done
 
-  wait4background
+  wait
 
 fi
 
@@ -104,7 +104,7 @@
       doforklog ./root-filesystem.sh $i
   done
 
-  wait4background
+  wait
 
   for i in ${ARCHES}
   do
@@ -112,7 +112,7 @@
     doforklog tar cjfC build/native-compiler-$i.tar.bz2 build/natemp-"$i" .
   done
 
-  wait4background
+  wait
 
   rm -rf build/natemp-* &
 fi
@@ -124,7 +124,7 @@
   LOG=build/logs/root-filesystem-$i.txt doforklog ./root-filesystem.sh $i
 done
 
-wait4background
+wait
 
 # Package all targets, including hw-targets.
 
@@ -140,4 +140,4 @@
   LOG=build/logs/smoketest-$i.txt doforklog ./smoketest.sh $i
 done
 
-wait4background 0
+wait
--- a/sources/functions.sh	Wed Jul 01 18:02:44 2009 -0500
+++ b/sources/functions.sh	Wed Jul 01 18:53:00 2009 -0500
@@ -419,25 +419,6 @@
     echo -en "\033]2;$ARCH_NAME $STAGE_NAME $PACKAGE\007"
 }
 
-# usage: wait4background [count]
-
-function wait4background()
-{
-  local COUNT="$1"
-  local EXCLUDE="$2"
-
-  [ -z "$COUNT" ] && COUNT=0
-  [ -z "$EXCLUDE" ] && EXCLUDE="thisdoesnotmatchanything"
-  # Wait for background tasks to finish
-  while [ $(jobs | grep -v "$EXCLUDE" | wc -l) -gt $COUNT ]
-  do
-    sleep 1
-    # Without this next line, bash never notices a change in the number of jobs.
-    # Bug noticed in Ubuntu 7.04
-    jobs > /dev/null
-  done
-}
-
 # Figure out what version of a package we last built
 
 function get_download_version()
--- a/system-image.sh	Wed Jul 01 18:02:44 2009 -0500
+++ b/system-image.sh	Wed Jul 01 18:53:00 2009 -0500
@@ -93,7 +93,7 @@
 
   # Wait for initial kernel build to finish.
 
-  wait4background
+  wait
 
   # This is a repeat of an earlier make invocation, but if we try to
   # consolidate them the dependencies build unnecessary prereqisites
@@ -157,7 +157,7 @@
 # Wait for kernel build to finish (may be a NOP)
 
 echo Image generation complete.
-wait4background
+wait
 trap "" EXIT
 
 # Install kernel