Permalink
Browse files

Merge pull request #24 from sgerrand/update-download-location

Update download URI
  • Loading branch information...
2 parents 3e607d8 + ec42859 commit 0e958b68633f9f454e4d4cde45c4f8bafed6f7e0 @spraints spraints committed on GitHub Jun 22, 2016
Showing with 7 additions and 14 deletions.
  1. +7 −14 libexec/goenv-install
View
@@ -33,19 +33,19 @@ else
fi
if [ "$platform" = "darwin" ]; then
- # Since go version 1.2, osx packages were subdivided into 10.6 and 10.8
- if [ "$version" = "1.2" -o "$version" \> "1.2" ]; then
+ # Since go version 1.2, macOS packages were subdivided into 10.6 and 10.8
+ # After version 1.4.2, the OS version postfix was dropped
+ if [ "$version" \> "1.4.2" ]; then
+ extra=""
+ elif [ "$version" = "1.2" -o "$version" \> "1.2" -o "$version" \< "1.4.3" ]; then
if [ "$(uname -r)" \> "12" ]; then
- extra="-osx10.8"
+ extra="-osx10.6"
else
extra="-osx10.6"
fi
fi
fi
-
-
-
function vercomp () {
# http://stackoverflow.com/questions/4023830
# 0: '='
@@ -81,15 +81,8 @@ function vercomp () {
# echo 0
}
+download="https://storage.googleapis.com/golang/go${version}.${platform}-${arch}${extra}.tar.gz"
-rtn=$(vercomp ${version} 1.2)
-# URL to download from
-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"
-fi
# Can't get too clever here
set +e

0 comments on commit 0e958b6

Please sign in to comment.