Commit afa0247c authored by Ian Lance Taylor's avatar Ian Lance Taylor

buildall.bash: clarify target selection

Avoid confusing use of $(( in non-arithmetic context.

Permit added targets linux-386-387 linux-arm-arm5 to be correctly
matched against pattern argument.

Change-Id: Ib004c926457acb760c7e270fdd2f4095b1787a6d
Reviewed-on: https://go-review.googlesource.com/33492
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 6ee8c6a7
......@@ -35,9 +35,27 @@ fi
./make.bash || exit 1
GOROOT="$(cd .. && pwd)"
gettargets() {
../bin/go tool dist list | sed -e 's|/|-|'
echo linux-386-387
echo linux-arm-arm5
}
selectedtargets() {
gettargets | egrep -v 'android-arm|darwin-arm' | egrep "$pattern"
}
# put linux, nacl first in the target list to get all the architectures up front.
targets="$((../bin/go tool dist list | sed -n 's/^\(.*\)\/\(.*\)/\1-\2/p'; echo linux-386-387 linux-arm-arm5) | sort | egrep -v android-arm | egrep "$pattern" | egrep 'linux|nacl')
$(../bin/go tool dist list | sed -n 's/^\(.*\)\/\(.*\)/\1-\2/p' | egrep -v 'android-arm|darwin-arm' | egrep "$pattern" | egrep -v 'linux|nacl')"
linux_nacl_targets() {
selectedtargets | egrep 'linux|nacl' | sort
}
non_linux_nacl_targets() {
selectedtargets | egrep -v 'linux|nacl' | sort
}
# Note words in $targets are separated by both newlines and spaces.
targets="$(linux_nacl_targets) $(non_linux_nacl_targets)"
failed=false
for target in $targets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment