From b3ac750c04c44e3829a327f6883404fbf58c6bbf Mon Sep 17 00:00:00 2001 From: Evan Owen Date: Mon, 21 Jul 2014 09:17:28 -0700 Subject: [PATCH 1/3] Remove extra 'go' from download URL path GO_BINARY_FILE already contains the full "go1.3..." path. Signed-off-by: Evan Owen --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 333837b..4bcd2eb 100755 --- a/scripts/install +++ b/scripts/install @@ -182,7 +182,7 @@ download_binary() { if [[ $? -ne 0 ]]; then display_error "Failed to download binary go from http://golang.org. Trying https://go.googlecode.com" - GO_BINARY_URL="https://go.googlecode.com/files/go${GO_BINARY_FILE}" + GO_BINARY_URL="https://go.googlecode.com/files/${GO_BINARY_FILE}" curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH} From f9b3d1699d1e2150f6f2b093572861fc514f805d Mon Sep 17 00:00:00 2001 From: Evan Owen Date: Mon, 21 Jul 2014 09:19:34 -0700 Subject: [PATCH 2/3] Replace go.googlecode.com fallback with storage.googleapis.com go.googlecode.com no longer works, storage.googleapis.com does. Signed-off-by: Evan Owen --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 4bcd2eb..b7f7e03 100755 --- a/scripts/install +++ b/scripts/install @@ -181,8 +181,8 @@ download_binary() { curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH} if [[ $? -ne 0 ]]; then - display_error "Failed to download binary go from http://golang.org. Trying https://go.googlecode.com" - GO_BINARY_URL="https://go.googlecode.com/files/${GO_BINARY_FILE}" + display_error "Failed to download binary go from http://golang.org. Trying https://storage.googleapis.com" + GO_BINARY_URL="https://storage.googleapis.com/golang/${GO_BINARY_FILE}" curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH} From fb0881a609d635da43de2341aa31b0555fbb3f2c Mon Sep 17 00:00:00 2001 From: Evan Owen Date: Mon, 21 Jul 2014 09:20:28 -0700 Subject: [PATCH 3/3] Fix indentation everywhere Signed-off-by: Evan Owen --- scripts/install | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/install b/scripts/install index b7f7e03..f2c4899 100755 --- a/scripts/install +++ b/scripts/install @@ -39,9 +39,9 @@ read_command_line() { -B|--binary) INSTALL_SOURCE="binary" ;; - --prefer-binary) - INSTALL_SOURCE="prefer-binary" - ;; + --prefer-binary) + INSTALL_SOURCE="prefer-binary" + ;; -h|--help) show_usage exit 0 @@ -164,13 +164,13 @@ download_binary() { exit 1 fi else - GVM_OS="linux" + GVM_OS="linux" fi if [ "$(uname -m)" == "x86_64" ]; then - GVM_ARCH="amd64" + GVM_ARCH="amd64" else - GVM_ARCH="386" + GVM_ARCH="386" fi GO_BINARY_FILE=${VERSION}.${GVM_OS}-${GVM_ARCH}${GVM_OS_VERSION}.tar.gz @@ -182,16 +182,16 @@ download_binary() { if [[ $? -ne 0 ]]; then display_error "Failed to download binary go from http://golang.org. Trying https://storage.googleapis.com" - GO_BINARY_URL="https://storage.googleapis.com/golang/${GO_BINARY_FILE}" + GO_BINARY_URL="https://storage.googleapis.com/golang/${GO_BINARY_FILE}" - curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH} + curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH} - if [[ $? -ne 0 ]]; then - display_error "Failed to download binary go" - rm -rf $GO_INSTALL_ROOT - rm -f $GO_BINARY_PATH - exit 1 - fi + if [[ $? -ne 0 ]]; then + display_error "Failed to download binary go" + rm -rf $GO_INSTALL_ROOT + rm -f $GO_BINARY_PATH + exit 1 + fi fi fi