diff options
Diffstat (limited to 'go/install_go.sh')
-rwxr-xr-x | go/install_go.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/go/install_go.sh b/go/install_go.sh index dad35530..79264b7e 100755 --- a/go/install_go.sh +++ b/go/install_go.sh @@ -10,8 +10,13 @@ else curl -o $GO_VERSION.tar.gz https://dl.google.com/go/$GO_VERSION.tar.gz fi -if [[ $(ls -A ./golang/*) ]] +if [[ -d ./golang ]] then - rm -r ./golang/* + if [[ $(ls -A ./golang/*) ]] + then + rm -r ./golang/* + fi +else + mkdir ./golang fi tar -C ./golang -xzf $GO_VERSION.tar.gz |