]> Cypherpunks repositories - gostls13.git/commitdiff
sudo.bash: print error/exit if problem with /usr/local/bin
authorMike Rosset <mike.rosset@gmail.com>
Thu, 1 Sep 2011 07:24:32 +0000 (17:24 +1000)
committerRob Pike <r@golang.org>
Thu, 1 Sep 2011 07:24:32 +0000 (17:24 +1000)
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

src/sudo.bash

index 147e58f1526e4a452975757d26f18ce2a070bbf3..3322a1856de60e1a42c01673118b1ea98300f05a 100755 (executable)
@@ -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