summaryrefslogtreecommitdiff
path: root/src/clean.bash
diff options
context:
space:
mode:
Diffstat (limited to 'src/clean.bash')
-rwxr-xr-xsrc/clean.bash7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/clean.bash b/src/clean.bash
index 3687244b2..90bad1f5f 100755
--- a/src/clean.bash
+++ b/src/clean.bash
@@ -3,6 +3,13 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
+set -e
+
+if [ -z "$GOROOT" ] ; then
+ echo '$GOROOT not set'
+ exit 1
+fi
+
GOBIN="${GOBIN:-$HOME/bin}"
rm -rf "$GOROOT"/pkg/${GOOS}_$GOARCH