2009-11-14 16:29:09 -07:00
|
|
|
#!/usr/bin/env bash
|
2008-06-12 14:26:16 -06:00
|
|
|
# Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file.
|
|
|
|
|
2009-12-13 13:27:19 -07:00
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ -z "$GOROOT" ] ; then
|
|
|
|
echo '$GOROOT not set'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2009-12-11 16:14:09 -07:00
|
|
|
GOBIN="${GOBIN:-$HOME/bin}"
|
|
|
|
|
2009-11-23 18:32:51 -07:00
|
|
|
rm -rf "$GOROOT"/pkg/${GOOS}_$GOARCH
|
|
|
|
rm -f "$GOROOT"/lib/*.a
|
2009-10-22 11:59:27 -06:00
|
|
|
for i in lib9 libbio libcgo libmach cmd pkg \
|
2009-10-03 11:38:03 -06:00
|
|
|
../misc/cgo/gmp ../misc/cgo/stdio \
|
2010-02-09 14:33:00 -07:00
|
|
|
../test/bench ../test/garbage
|
2009-10-03 11:38:03 -06:00
|
|
|
do(
|
2009-12-11 16:14:09 -07:00
|
|
|
cd "$GOROOT"/src/$i || exit 1
|
2009-10-03 11:38:03 -06:00
|
|
|
if test -f clean.bash; then
|
2008-09-19 12:55:46 -06:00
|
|
|
bash clean.bash
|
2009-10-03 11:38:03 -06:00
|
|
|
else
|
2009-12-11 16:14:09 -07:00
|
|
|
"$GOBIN"/gomake clean
|
2009-10-03 11:38:03 -06:00
|
|
|
fi
|
|
|
|
)done
|