aboutsummaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorDave Cheney <dave@cheney.net>2015-08-20 12:28:51 +1000
committerDave Cheney <dave@cheney.net>2015-08-24 03:04:52 +0000
commitf9379eb3467d2b6feb8fb0c7c2c366b81408305d (patch)
treed8640f99120216d1052f88e5d010c6ec24db1564 /src/make.bash
parent397b4f6cbff1c462abc25b60358298d3308d13f6 (diff)
downloadgo-f9379eb3467d2b6feb8fb0c7c2c366b81408305d.tar.gz
go-f9379eb3467d2b6feb8fb0c7c2c366b81408305d.zip
make.bash: abort if $GOROOT_BOOTSTRAP == $GOROOT
Fixes #12214 Change-Id: I82586b54ac7b9c0c71055bb66b921e3efbf4977c Reviewed-on: https://go-review.googlesource.com/13719 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src/make.bash')
-rwxr-xr-xsrc/make.bash6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/make.bash b/src/make.bash
index f17648aff5..b4780c7e9a 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -116,6 +116,12 @@ GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4}
if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then
echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go." >&2
echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2
+ exit 1
+fi
+if [ "$GOROOT_BOOTSTRAP" == "$GOROOT" ]; then
+ echo "ERROR: \$GOROOT_BOOTSTRAP must not be set to \$GOROOT" >&2
+ echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2
+ exit 1
fi
rm -f cmd/dist/dist
GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist