summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-08-31 22:07:43 -0500
committerRob Landley <rob@landley.net>2014-08-31 22:07:43 -0500
commit658887a48c11b0933c74dd399b8fe5feaf0aa018 (patch)
tree4aec9fbb826cf0c36817b4e0ca26aa7fcb9c5862 /scripts
parent72e84a2f3b758026dcb37abdb8c8383c9a07ec94 (diff)
downloadtoybox-658887a48c11b0933c74dd399b8fe5feaf0aa018.tar.gz
toybox-658887a48c11b0933c74dd399b8fe5feaf0aa018.tar.bz2
toybox-658887a48c11b0933c74dd399b8fe5feaf0aa018.zip
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/make.sh b/scripts/make.sh
index 42143f8..23e4a9b 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