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/run.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/run.bash') diff --git a/src/run.bash b/src/run.bash index c0029c51f4..1fde5f4610 100755 --- a/src/run.bash +++ b/src/run.bash @@ -36,12 +36,12 @@ ulimit -c 0 # This is a system misconfiguration and should be fixed on the # broken system, not "fixed" by ignoring the failure here. # See longer discussion on golang.org/issue/7381. -[ "$(ulimit -H -n)" == "unlimited" ] || ulimit -S -n $(ulimit -H -n) -[ "$(ulimit -H -d)" == "unlimited" ] || ulimit -S -d $(ulimit -H -d) +[ "$(ulimit -H -n)" = "unlimited" ] || ulimit -S -n $(ulimit -H -n) +[ "$(ulimit -H -d)" = "unlimited" ] || ulimit -S -d $(ulimit -H -d) # Thread count limit on NetBSD 7. if ulimit -T &> /dev/null; then - [ "$(ulimit -H -T)" == "unlimited" ] || ulimit -S -T $(ulimit -H -T) + [ "$(ulimit -H -T)" = "unlimited" ] || ulimit -S -T $(ulimit -H -T) fi exec go tool dist test -rebuild "$@" -- cgit v1.3