diff options
| author | Shenghou Ma <minux.ma@gmail.com> | 2012-04-02 22:33:38 +0800 |
|---|---|---|
| committer | Shenghou Ma <minux.ma@gmail.com> | 2012-04-02 22:33:38 +0800 |
| commit | a9de5bb3eb36fcae6d0744603a5bd7a5be606796 (patch) | |
| tree | e9ab0759e5ad9a6e6cdd5c4933e8076810d722dd /src/sudo.bash | |
| parent | a84056dabe8ce3178879db7416365a2d841bff0a (diff) | |
| download | go-a9de5bb3eb36fcae6d0744603a5bd7a5be606796.tar.xz | |
cmd/dist, sudo.bash: don't mention sudo.bash if cov or prof is not present
Fixes #3422.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5967057
Diffstat (limited to 'src/sudo.bash')
| -rwxr-xr-x | src/sudo.bash | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sudo.bash b/src/sudo.bash index cccebd3427..40f8d1aa19 100755 --- a/src/sudo.bash +++ b/src/sudo.bash @@ -12,12 +12,17 @@ Darwin) exit 0 esac +eval $(go env) +if ! [ -x $GOTOOLDIR/cov -a -x $GOTOOLDIR/prof ]; then + echo "You don't need to run sudo.bash." >&2 + exit 2 +fi + if [[ ! -d /usr/local/bin ]]; then echo 1>&2 'sudo.bash: problem with /usr/local/bin; cannot install tools.' exit 2 fi -eval $(go env) cd $(dirname $0) for i in prof cov do |
