Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1364)

Side by Side Diff: src/sudo.bash

Issue 5967057: code review 5967057: cmd/dist, sudo.bash: don't mention sudo.bash if cov and... (Closed)
Patch Set: diff -r 4f9605dc4a10 https://code.google.com/p/go/ Created 13 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/cmd/dist/build.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 # Copyright 2009 The Go Authors. All rights reserved. 2 # Copyright 2009 The Go Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style 3 # Use of this source code is governed by a BSD-style
4 # license that can be found in the LICENSE file. 4 # license that can be found in the LICENSE file.
5 5
6 set -e 6 set -e
7 7
8 case "`uname`" in 8 case "`uname`" in
9 Darwin) 9 Darwin)
10 ;; 10 ;;
11 *) 11 *)
12 exit 0 12 exit 0
13 esac 13 esac
14 14
15 eval $(go env)
16 if ! [ -x $GOTOOLDIR/cov -a -x $GOTOOLDIR/prof ]; then
17 echo "You don't need to run sudo.bash." >&2
18 exit 2
19 fi
20
15 if [[ ! -d /usr/local/bin ]]; then 21 if [[ ! -d /usr/local/bin ]]; then
16 echo 1>&2 'sudo.bash: problem with /usr/local/bin; cannot install tools. ' 22 echo 1>&2 'sudo.bash: problem with /usr/local/bin; cannot install tools. '
17 exit 2 23 exit 2
18 fi 24 fi
19 25
20 eval $(go env)
21 cd $(dirname $0) 26 cd $(dirname $0)
22 for i in prof cov 27 for i in prof cov
23 do 28 do
24 # Remove old binaries if present 29 # Remove old binaries if present
25 sudo rm -f /usr/local/bin/6$i 30 sudo rm -f /usr/local/bin/6$i
26 # Install new binaries 31 # Install new binaries
27 sudo cp $GOTOOLDIR/$i /usr/local/bin/go$i 32 sudo cp $GOTOOLDIR/$i /usr/local/bin/go$i
28 sudo chgrp procmod /usr/local/bin/go$i 33 sudo chgrp procmod /usr/local/bin/go$i
29 sudo chmod g+s /usr/local/bin/go$i 34 sudo chmod g+s /usr/local/bin/go$i
30 done 35 done
OLDNEW
« no previous file with comments | « src/cmd/dist/build.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b