Commit bdeebf49 authored by Christopher Wedgwood's avatar Christopher Wedgwood Committed by Russ Cox

clean.bash: fix standalone runs

R=rsc
CC=golang-dev
https://golang.org/cl/1933043
parent 60c5dadb
...@@ -5,21 +5,16 @@ ...@@ -5,21 +5,16 @@
set -e set -e
if [ -z "$GOROOT" ] ; then if [ ! -f env.bash ]; then
echo '$GOROOT not set' echo 'clean.bash must be run from $GOROOT/src' 1>&2
exit 1 exit 1
fi fi
if [ -z "$GOOS" ] ; then . ./env.bash
echo '$GOOS not set' if [ ! -f Make.inc ] ; then
exit 1 GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT}
fi sed 's!@@GOROOT@@!'"$GOROOT_FINAL"'!' Make.inc.in >Make.inc
if [ -z "$GOARCH" ] ; then
echo '$GOARCH not set'
exit 1
fi fi
GOBIN="${GOBIN:-$HOME/bin}"
if [ "$1" != "--nopkg" ]; then if [ "$1" != "--nopkg" ]; then
rm -rf "$GOROOT"/pkg/${GOOS}_$GOARCH rm -rf "$GOROOT"/pkg/${GOOS}_$GOARCH
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment