diff options
author | Devon H. O'Dell <devon.odell@gmail.com> | 2009-12-11 15:14:09 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-12-11 15:14:09 -0800 |
commit | 857d4cf1a924dc23e08204822a51a1baa93a7f21 (patch) | |
tree | c27f414c2459f882375ddbc98a3964204dc98fd5 /src/clean.bash | |
parent | 0714fbb6ae908566c2779579a26b1cb371150ed4 (diff) | |
download | go-857d4cf1a924dc23e08204822a51a1baa93a7f21.tar.gz go-857d4cf1a924dc23e08204822a51a1baa93a7f21.zip |
Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/src
This change removes the necessity to have GOBIN in $PATH,
and also doesn't assume that the build is being run from
$GOROOT/src. This is a minimal set of necessary changes
to get Go to build happily from the FreeBSD ports
collection.
R=rsc
CC=golang-dev
https://golang.org/cl/171044
Diffstat (limited to 'src/clean.bash')
-rwxr-xr-x | src/clean.bash | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/clean.bash b/src/clean.bash index f6fc6d1f5e..3687244b20 100755 --- a/src/clean.bash +++ b/src/clean.bash @@ -3,16 +3,18 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +GOBIN="${GOBIN:-$HOME/bin}" + rm -rf "$GOROOT"/pkg/${GOOS}_$GOARCH rm -f "$GOROOT"/lib/*.a for i in lib9 libbio libcgo libmach cmd pkg \ ../misc/cgo/gmp ../misc/cgo/stdio \ ../test/bench do( - cd $i || exit 1 + cd "$GOROOT"/src/$i || exit 1 if test -f clean.bash; then bash clean.bash else - gomake clean + "$GOBIN"/gomake clean fi )done |