Skip to content

Commit 2d70d60

Browse files
committed
sanity check environment variables better.
Fixes #12. R=agl1 CC=golang-dev https://golang.org/cl/152055
1 parent ea5440d commit 2d70d60

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/make.bash

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ then
2020
exit 1
2121
fi
2222

23+
case "$GOARCH" in
24+
amd64 | 386 | arm)
25+
;;
26+
*)
27+
echo '$GOARCH is set to <'$GOARCH'>, must be amd64, 386, or arm' 1>&2
28+
exit 1
29+
esac
30+
31+
case "$GOOS" in
32+
darwin | linux | nacl)
33+
;;
34+
*)
35+
echo '$GOOS is set to <'$GOOS'>, must be darwin, linux, or nacl' 1>&2
36+
exit 1
37+
esac
38+
39+
2340
bash clean.bash
2441

2542
rm -f $GOBIN/quietgcc

0 commit comments

Comments
 (0)