codekingpro/portable-devtools
114k
1#!/usr/bin/env bash2# Copyright 2009 The Go Authors. All rights reserved.3# Use of this source code is governed by a BSD-style4# license that can be found in the LICENSE file.5 6set -e7 8if [ ! -f run.bash ]; then9 echo 'clean.bash must be run from $GOROOT/src' 1>&210 exit 111fi12export GOROOT="$(cd .. && pwd)"13 14gobin="${GOROOT}"/bin15if ! "$gobin"/go help >/dev/null 2>&1; then16 echo 'cannot find go command; nothing to clean' >&217 exit 118fi19 20"$gobin/go" clean -i std21"$gobin/go" tool dist clean22"$gobin/go" clean -i cmd23 