From: Ian Lance Taylor Date: Wed, 23 Nov 2016 16:45:15 +0000 (-0800) Subject: buildall.bash: clarify target selection X-Git-Tag: go1.9beta1~1738 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=afa0247c5d28eb9558311729c8edf3f0c898644f;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/buildall.bash b/src/buildall.bash index a322fe537a..57bee8d6a5 100755 --- a/src/buildall.bash +++ b/src/buildall.bash @@ -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