From 420934348d31ea1da24ccd08b8e8488c475fb50e Mon Sep 17 00:00:00 2001 From: Mike Rosset Date: Thu, 1 Sep 2011 17:24:32 +1000 Subject: [PATCH] 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 --- src/sudo.bash | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.48.1