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 @@
set -e
if [ -z "$GOROOT" ] ; then
echo '$GOROOT not set'
if [ ! -f env.bash ]; then
echo 'clean.bash must be run from $GOROOT/src' 1>&2
exit 1
fi
if [ -z "$GOOS" ] ; then
echo '$GOOS not set'
exit 1
fi
if [ -z "$GOARCH" ] ; then
echo '$GOARCH not set'
exit 1
. ./env.bash
if [ ! -f Make.inc ] ; then
GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT}
sed 's!@@GOROOT@@!'"$GOROOT_FINAL"'!' Make.inc.in >Make.inc
fi
GOBIN="${GOBIN:-$HOME/bin}"
if [ "$1" != "--nopkg" ]; then
rm -rf "$GOROOT"/pkg/${GOOS}_$GOARCH
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