summaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-10 19:12:22 -0800
committerRuss Cox <rsc@golang.org>2009-11-10 19:12:22 -0800
commit0a39c833bfac19ad99a907e8daacaf163d1b9c69 (patch)
treebfffb611a3b6d056950ee5065f9943a594116313 /src/make.bash
parentbc4ef09e73dc4b1a230c90ed19a016d3c13ba5f7 (diff)
downloadgo-0a39c833bfac19ad99a907e8daacaf163d1b9c69.tar.gz
sanity check environment variables better.
Fixes issue 12. R=agl1 CC=golang-dev http://codereview.appspot.com/152055
Diffstat (limited to 'src/make.bash')
-rwxr-xr-xsrc/make.bash17
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