summaryrefslogtreecommitdiff
path: root/src/sudo.bash
diff options
context:
space:
mode:
authorMike Rosset <mike.rosset@gmail.com>2011-09-01 17:24:32 +1000
committerMike Rosset <mike.rosset@gmail.com>2011-09-01 17:24:32 +1000
commite72b9d2f74d735a7d1f2e2aa1edb5780f9093def (patch)
tree636b6c6805b0870b188ee7cacaf038dc573a0f3c /src/sudo.bash
parent5e9cceca330523055bd23a0aba9bcb8c1716fd3a (diff)
downloadgo-e72b9d2f74d735a7d1f2e2aa1edb5780f9093def.tar.gz
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 issue 2209. R=golang-dev, r, adg CC=golang-dev, mike.rosset http://codereview.appspot.com/4950057 Committer: Rob Pike <r@golang.org>
Diffstat (limited to 'src/sudo.bash')
-rwxr-xr-xsrc/sudo.bash5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sudo.bash b/src/sudo.bash
index 147e58f15..3322a1856 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