From a9824cd47c1927ffc4eca040d60aecaa26130329 Mon Sep 17 00:00:00 2001 From: Daniel Martí Date: Fri, 10 Mar 2017 17:15:46 +0000 Subject: *.bash: always use the same string equality operator POSIX Shell only supports = to compare variables inside '[' tests. But this is Bash, where == is an alias for =. In practice they're the same, but the current form is inconsisnent and breaks POSIX for no good reason. Change-Id: I38fa7a5a90658dc51acc2acd143049e510424ed8 Reviewed-on: https://go-review.googlesource.com/38031 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/make.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/make.bash') diff --git a/src/make.bash b/src/make.bash index 6e6f96d5c7..71e75318f2 100755 --- a/src/make.bash +++ b/src/make.bash @@ -107,7 +107,7 @@ done # Test for debian/kFreeBSD. # cmd/dist will detect kFreeBSD as freebsd/$GOARCH, but we need to # disable cgo manually. -if [ "$(uname -s)" == "GNU/kFreeBSD" ]; then +if [ "$(uname -s)" = "GNU/kFreeBSD" ]; then export CGO_ENABLED=0 fi @@ -125,7 +125,7 @@ if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2 exit 1 fi -if [ "$GOROOT_BOOTSTRAP" == "$GOROOT" ]; then +if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then echo "ERROR: \$GOROOT_BOOTSTRAP must not be set to \$GOROOT" >&2 echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2 exit 1 -- cgit v1.3