From 978d7530e24be6f2f4fee2c37e546dd3d135067f Mon Sep 17 00:00:00 2001 From: ryurock Date: Sat, 26 Dec 2015 16:24:57 +0900 Subject: [PATCH] goenv-install darwin 1.4.2 later noen extra --- libexec/goenv-install | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libexec/goenv-install b/libexec/goenv-install index 486a5e3..6824782 100755 --- a/libexec/goenv-install +++ b/libexec/goenv-install @@ -41,11 +41,12 @@ if [ "$platform" = "darwin" ]; then extra="-osx10.6" fi fi + # 1.4.3 later extra none + if [ "$version" \> "1.4.2" ]; then + extra="" + fi fi - - - function vercomp () { # http://stackoverflow.com/questions/4023830 # 0: '=' @@ -88,8 +89,9 @@ if [ "$rtn" == "1" ] then download="http://golang.org/dl/go${version}.${platform}-${arch}${extra}.tar.gz" else - download="https://go.googlecode.com/files/go${version}.${platform}-${arch}${extra}.tar.gz" + download="https://storage.googleapis.com/golang/go${version}.${platform}-${arch}${extra}.tar.gz" fi + # Can't get too clever here set +e