]> Cypherpunks.ru repositories - gostls13.git/commitdiff
build: fail nicely if somebody runs all.bash from a binary tarball package
authorMostyn Bramley-Moore <mostyn@antipode.se>
Wed, 26 Apr 2017 21:43:46 +0000 (23:43 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 26 Apr 2017 22:57:29 +0000 (22:57 +0000)
Fixes golang/go#20008.

Change-Id: I7a429490320595fc558a8c5e260ec41bc3a788e2
Reviewed-on: https://go-review.googlesource.com/41858
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

src/all.bash

index 5d994d3d0dae97f070d4299a90443519d387ffd4..abe2beb6dd8b4655f8d2ddd0aa6456cb3e07aebb 100755 (executable)
@@ -8,6 +8,10 @@ if [ ! -f make.bash ]; then
        echo 'all.bash must be run from $GOROOT/src' 1>&2
        exit 1
 fi
+if [ ! -f cmd/api/run.go ]; then
+       echo 'all.bash cannot be run from a binary download package' 1>&2
+       exit 1
+fi
 OLDPATH="$PATH"
 . ./make.bash "$@" --no-banner
 bash run.bash --no-rebuild