diff options
author | Russ Cox <rsc@golang.org> | 2009-11-10 19:12:22 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-11-10 19:12:22 -0800 |
commit | 0a39c833bfac19ad99a907e8daacaf163d1b9c69 (patch) | |
tree | bfffb611a3b6d056950ee5065f9943a594116313 | |
parent | bc4ef09e73dc4b1a230c90ed19a016d3c13ba5f7 (diff) | |
download | go-0a39c833bfac19ad99a907e8daacaf163d1b9c69.tar.gz |
sanity check environment variables better.
Fixes issue 12.
R=agl1
CC=golang-dev
http://codereview.appspot.com/152055
-rwxr-xr-x | src/make.bash | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/make.bash b/src/make.bash index 9f7c80c48..6135bef04 100755 --- a/src/make.bash +++ b/src/make.bash @@ -20,6 +20,23 @@ then exit 1 fi +case "$GOARCH" in +amd64 | 386 | arm) + ;; +*) + echo '$GOARCH is set to <'$GOARCH'>, must be amd64, 386, or arm' 1>&2 + exit 1 +esac + +case "$GOOS" in +darwin | linux | nacl) + ;; +*) + echo '$GOOS is set to <'$GOOS'>, must be darwin, linux, or nacl' 1>&2 + exit 1 +esac + + bash clean.bash rm -f $GOBIN/quietgcc |