]> Cypherpunks repositories - gostls13.git/commitdiff
sanity check environment variables better.
authorRuss Cox <rsc@golang.org>
Wed, 11 Nov 2009 03:12:22 +0000 (19:12 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 11 Nov 2009 03:12:22 +0000 (19:12 -0800)
Fixes #12.

R=agl1
CC=golang-dev
https://golang.org/cl/152055

src/make.bash

index 9f7c80c48c143399471ff59feaf96b293e0e6b8b..6135bef043a0010df86c97ed499165e526a74fd9 100755 (executable)
@@ -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