From 7776fd80c467ccc391bf657404467794b63c709b Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 5 Oct 2019 20:48:21 +0200 Subject: improve golang installation script --- go/install_go.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'go') 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 -- cgit v1.2.3