From: Mike Rosset Date: Thu, 1 Sep 2011 07:24:32 +0000 (+1000) Subject: sudo.bash: print error/exit if problem with /usr/local/bin X-Git-Tag: weekly.2011-09-07~49 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=420934348d31ea1da24ccd08b8e8488c475fb50e;p=gostls13.git 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 --- 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