mirror of
https://github.com/golang/go
synced 2024-11-26 06:17:57 -07:00
src: simplify race.bash checking condition
By using "uname -s -m" to get the OS name and hardware name, then using it to match supported platform in case command. Change-Id: I5161a29c6f3fe34dcda9e7bd477fa3b772b9e041 Reviewed-on: https://go-review.googlesource.com/c/go/+/320250 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
1951afc919
commit
a8d39f151d
@ -13,35 +13,16 @@ function usage {
|
||||
exit 1
|
||||
}
|
||||
|
||||
case $(uname) in
|
||||
"Darwin")
|
||||
if [ $(uname -m) != "x86_64" ] && [ $(uname -m) != "arm64" ]; then
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
"Linux")
|
||||
if [ $(uname -m) != "x86_64" ] && [ $(uname -m) != "ppc64le" ] && [ $(uname -m) != "aarch64" ]; then
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
"FreeBSD")
|
||||
if [ $(uname -m) != "amd64" ]; then
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
"NetBSD")
|
||||
if [ $(uname -m) != "amd64" ]; then
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
"OpenBSD")
|
||||
if [ $(uname -m) != "amd64" ]; then
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
case $(uname -s -m) in
|
||||
"Darwin x86_64") ;;
|
||||
"Darwin arm64") ;;
|
||||
"Linux x86_64") ;;
|
||||
"Linux ppc64le") ;;
|
||||
"Linux aarch64") ;;
|
||||
"FreeBSD amd64") ;;
|
||||
"NetBSD amd64") ;;
|
||||
"OpenBSD amd64") ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
|
||||
if [ ! -f make.bash ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user