Skip to content

Commit

Permalink
sanity check environment variables better.
Browse files Browse the repository at this point in the history
Fixes #12.

R=agl1
CC=golang-dev
https://golang.org/cl/152055
  • Loading branch information
rsc committed Nov 11, 2009
1 parent ea5440d commit 2d70d60
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d70d60

Please sign in to comment.