diff options
author | Rob Landley <rob@landley.net> | 2014-08-31 22:07:43 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-08-31 22:07:43 -0500 |
commit | 658887a48c11b0933c74dd399b8fe5feaf0aa018 (patch) | |
tree | 4aec9fbb826cf0c36817b4e0ca26aa7fcb9c5862 | |
parent | 72e84a2f3b758026dcb37abdb8c8383c9a07ec94 (diff) | |
download | toybox-658887a48c11b0933c74dd399b8fe5feaf0aa018.tar.gz |
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.
-rwxr-xr-x | scripts/make.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 |