]> Cypherpunks.ru repositories - gostls13.git/commitdiff
make.bash: abort if $GOROOT_BOOTSTRAP == $GOROOT
authorDave Cheney <dave@cheney.net>
Thu, 20 Aug 2015 02:28:51 +0000 (12:28 +1000)
committerDave Cheney <dave@cheney.net>
Mon, 24 Aug 2015 03:04:52 +0000 (03:04 +0000)
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>
src/make.bash

index f17648aff51b5e5be2015395650d5fe28101b13d..b4780c7e9a53f5ffe19c0b1f1f16fa8d92ef3411 100755 (executable)
@@ -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