summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgo/install_go.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/go/install_go.sh b/go/install_go.sh
index 0181d77c..dad35530 100755
--- a/go/install_go.sh
+++ b/go/install_go.sh
@@ -2,5 +2,16 @@
GO_VERSION=go1.12.7.linux-amd64
-curl -o $GO_VERSION.tar.gz https://dl.google.com/go/$GO_VERSION.tar.gz
+if [[ $(ls -A ${GO_VERSION}.tar.gz) ]]
+then
+ echo "reusing downloaded golang bundle"
+else
+ echo "installing go lang bundle ${GO_VERSION}.tar.gz"
+ curl -o $GO_VERSION.tar.gz https://dl.google.com/go/$GO_VERSION.tar.gz
+fi
+
+if [[ $(ls -A ./golang/*) ]]
+then
+ rm -r ./golang/*
+fi
tar -C ./golang -xzf $GO_VERSION.tar.gz