summaryrefslogtreecommitdiff
path: root/src/sudo.bash
diff options
context:
space:
mode:
Diffstat (limited to 'src/sudo.bash')
-rwxr-xr-xsrc/sudo.bash12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sudo.bash b/src/sudo.bash
index 3322a1856..78cdb0b8a 100755
--- a/src/sudo.bash
+++ b/src/sudo.bash
@@ -4,7 +4,6 @@
# license that can be found in the LICENSE file.
set -e
-. ./env.bash
case "`uname`" in
Darwin)
@@ -18,9 +17,14 @@ if [[ ! -d /usr/local/bin ]]; then
exit 2
fi
+eval $(go tool dist env)
+cd $(dirname $0)
for i in prof cov
do
- sudo cp "$GOROOT"/src/cmd/$i/6$i /usr/local/bin/6$i
- sudo chgrp procmod /usr/local/bin/6$i
- sudo chmod g+s /usr/local/bin/6$i
+ # Remove old binaries if present
+ sudo rm -f /usr/local/bin/6$i
+ # Install new binaries
+ sudo cp $GOTOOLDIR/$i /usr/local/bin/go$i
+ sudo chgrp procmod /usr/local/bin/go$i
+ sudo chmod g+s /usr/local/bin/go$i
done