From 658887a48c11b0933c74dd399b8fe5feaf0aa018 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 31 Aug 2014 22:07:43 -0500 Subject: More parallel build tweaks. echo "$PENDING" needs the quotes to avoid gluing the lines together, which prevents wc -l or head -n +2 from working right. --- scripts/make.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/make.sh') diff --git a/scripts/make.sh b/scripts/make.sh index 42143f8e..23e4a9b6 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -199,9 +199,9 @@ do while true do PENDING="$(echo $PENDING $(jobs -rp) | tr ' ' '\n' | sort -u)" - [ $(echo $PENDING | wc -l) -lt "$CPUS" ] && break; + [ $(echo "$PENDING" | wc -l) -lt "$CPUS" ] && break; - wait $(echo $PENDING | head -n 1) || exit 1 + wait $(echo "$PENDING" | head -n 1) || exit 1 PENDING="$(echo "$PENDING" | tail -n +2)" done done -- cgit v1.2.3