OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01e6a73
)
Don't hang for $CPUS=1.
author
Rob Landley
<rob@landley.net>
Thu, 4 Sep 2014 05:23:51 +0000
(
00:23
-0500)
committer
Rob Landley
<rob@landley.net>
Thu, 4 Sep 2014 05:23:51 +0000
(
00:23
-0500)
echo prints a newline if it has nothing to print, so wc -l always returns at least 1. Fix: echo -n
scripts/make.sh
patch
|
blob
|
history
diff --git
a/scripts/make.sh
b/scripts/make.sh
index
23e4a9b
..
3bd8b4d
100755
(executable)
--- a/
scripts/make.sh
+++ b/
scripts/make.sh
@@
-199,7
+199,7
@@
do
while true
do
PENDING="$(echo $PENDING $(jobs -rp) | tr ' ' '\n' | sort -u)"
- [ $(echo "$PENDING" | wc -l) -lt "$CPUS" ] && break;
+ [ $(echo
-n
"$PENDING" | wc -l) -lt "$CPUS" ] && break;
wait $(echo "$PENDING" | head -n 1) || exit 1
PENDING="$(echo "$PENDING" | tail -n +2)"