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
commitac0afaeb4ebbd0c14e9873c6544ae520c6ea8d5e (patch)
treebfffb611a3b6d056950ee5065f9943a594116313 /src/make.bash
parentb240a1ead670737624a2a298d53e5f35b336e3e9 (diff)
downloadgolang-ac0afaeb4ebbd0c14e9873c6544ae520c6ea8d5e.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