Mercurial > hg > toybox
changeset 1454:ab91ee85afbd draft
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.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 31 Aug 2014 22:07:43 -0500 |
parents | 3c0ed9acbaa3 |
children | 70f5188b4848 |
files | scripts/make.sh |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/make.sh Sun Aug 31 14:06:37 2014 -0500 +++ b/scripts/make.sh Sun Aug 31 22:07:43 2014 -0500 @@ -199,9 +199,9 @@ 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