diff options
author | Joe Poirier <jdpoirier@gmail.com> | 2011-04-23 11:34:08 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2011-04-23 11:34:08 -0700 |
commit | 057fa94d3160a31b29d7a3bde9727dd1df0e31e2 (patch) | |
tree | 767e44206606364131d9647bd35e5f62226d4185 | |
parent | f3113ee9b91712d49400589ff2b2c5f7514ffc85 (diff) | |
download | go-057fa94d3160a31b29d7a3bde9727dd1df0e31e2.tar.gz go-057fa94d3160a31b29d7a3bde9727dd1df0e31e2.zip |
rc/env.bash: fix for Go tool-chain build on windows under msys.
The path conversion is done automatically if msys' builtin
shell commands are used.
R=rsc1, peterGo, brainman, Mr_Dark, r
CC=golang-dev
https://golang.org/cl/4452042
-rw-r--r-- | src/env.bash | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/env.bash b/src/env.bash index c1055d561b..ca3ecebe87 100644 --- a/src/env.bash +++ b/src/env.bash @@ -3,6 +3,16 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +# If set to a Windows-style path convert to an MSYS-Unix +# one using the built-in shell commands. +if [[ "$GOROOT" == *:* ]]; then + GOROOT=$(cd "$GOROOT"; pwd) +fi + +if [[ "$GOBIN" == *:* ]]; then + GOBIN=$(cd "$GOBIN"; pwd) +fi + export GOROOT=${GOROOT:-$(cd ..; pwd)} if ! test -f "$GOROOT"/include/u.h |