diff options
| author | Mike Rosset <mike.rosset@gmail.com> | 2011-09-01 17:24:32 +1000 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2011-09-01 17:24:32 +1000 |
| commit | 420934348d31ea1da24ccd08b8e8488c475fb50e (patch) | |
| tree | 9878bc4ceea3998f5013e4efbae3dac31eacf5f0 /src/sudo.bash | |
| parent | ca64a37d9d925dec179e1142097dc9f135807656 (diff) | |
| download | go-420934348d31ea1da24ccd08b8e8488c475fb50e.tar.xz | |
sudo.bash: print error/exit if problem with /usr/local/bin
When installing profiling tools on Mac OS X print
message if there is a problem with /usr/local/bin
Fixes #2209.
R=golang-dev, r, adg
CC=golang-dev, mike.rosset
https://golang.org/cl/4950057
Diffstat (limited to 'src/sudo.bash')
| -rwxr-xr-x | src/sudo.bash | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sudo.bash b/src/sudo.bash index 147e58f152..3322a1856d 100755 --- a/src/sudo.bash +++ b/src/sudo.bash @@ -13,6 +13,11 @@ Darwin) exit 0 esac +if [[ ! -d /usr/local/bin ]]; then + echo 1>&2 'sudo.bash: problem with /usr/local/bin; cannot install tools.' + exit 2 +fi + for i in prof cov do sudo cp "$GOROOT"/src/cmd/$i/6$i /usr/local/bin/6$i |
