Fix "gvm cross" for Go 1.4

> go tool dist: opendir /home/user/.gvm/gos/go1.4/src/pkg/runtime: No such file or directory
> ERROR: Couldn't compile runtime library for darwin amd64
This commit is contained in:
Tianon Gravi
2015-02-03 22:03:22 -07:00
parent c6850e273a
commit d1db113a52
+7 -1
View File
@@ -48,7 +48,13 @@ if [ ! -d "$GOROOT/pkg/${GOOS}_${GOARCH}" ]; then
fi
cd "$GOROOT/src"
go tool dist install -v pkg/runtime ||
if [ -d pkg/runtime ]; then
runtime='pkg/runtime'
else
# Go 1.4 moved pkg/ up a level
runtime='runtime'
fi
go tool dist install -v "$runtime" ||
display_fatal "Couldn't compile runtime library for $GOOS $GOARCH"
go install -v -a std ||
display_fatal "Install runtime library for $GOOS $GOARCH"