From d45f654425b40b62130c7c5d4f8cf2888fb256af Mon Sep 17 00:00:00 2001 From: udhos Date: Fri, 16 Feb 2018 20:29:50 -0200 Subject: [PATCH] shellcheck fixes. --- update-golang.sh | 6 +++--- update-golang.sh.sha256 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/update-golang.sh b/update-golang.sh index e61b202..32c1ec4 100755 --- a/update-golang.sh +++ b/update-golang.sh @@ -71,7 +71,7 @@ find_latest() { else fetch="curl --silent" fi - last=$(scan_versions $fetch | tail -1) + last=$(scan_versions "$fetch" | tail -1) if echo "$last" | grep -q -E '[0-9]\.[0-9]+(\.[0-9]+)?'; then msg find_latest: found last release: "$last" release=$last @@ -112,9 +112,9 @@ goroot=$destination/go filepath=$cache/$filename new_install=$destination/$label -tmp= ;# will be set +tmp='' ;# will be set save_dir=$PWD -previous_install= ;# will be set +previous_install='' ;# will be set cleanup() { [ -n "$tmp" ] && [ -f "$tmp" ] && msg cleanup: $tmp && rm $tmp [ -n "$save_dir" ] && cd "$save_dir" || exit 2 diff --git a/update-golang.sh.sha256 b/update-golang.sh.sha256 index c44d5d0..16543d5 100644 --- a/update-golang.sh.sha256 +++ b/update-golang.sh.sha256 @@ -1 +1 @@ -17a323f6303a859aadc2925344699f8c2bca98f13937e7029d10029f94067e97 update-golang.sh +074d4be3472c165b4112201ab2aef2dcef6fbe946dc9c8be4d97878fc3a6908e update-golang.sh