]> Cypherpunks repositories - gostls13.git/commitdiff
rc/env.bash: fix for Go tool-chain build on windows under msys.
authorJoe Poirier <jdpoirier@gmail.com>
Sat, 23 Apr 2011 18:34:08 +0000 (11:34 -0700)
committerRob Pike <r@golang.org>
Sat, 23 Apr 2011 18:34:08 +0000 (11:34 -0700)
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

src/env.bash

index c1055d561b27980fa82869f851870a8e5fa20522..ca3ecebe87dbdafc4ff4d7f342af37b84414dc06 100644 (file)
@@ -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