From d2029542a7ade19a7d517c3d52d14c9f5eb24f6a Mon Sep 17 00:00:00 2001 From: earthlng Date: Fri, 23 Nov 2018 01:39:20 +0000 Subject: [PATCH] Update updater.sh make sure nothing spills into stdout because we use that to return the filename --- updater.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/updater.sh b/updater.sh index 58c0b50..69be625 100755 --- a/updater.sh +++ b/updater.sh @@ -131,14 +131,15 @@ fi download_file () { declare -r url=$1 declare -r tf=$(mktemp) + local dlcmd="" if [ $DOWNLOAD_METHOD = "curl" ]; then - curl -o $tf "${url}" + dlcmd="curl -o $tf" else - wget -O $tf "${url}" + dlcmd="wget -O $tf" fi - echo "$tf" # return the temp-filename + $dlcmd "${url}" >/dev/null && echo "$tf" || echo "" # return the temp-filename (or empty string on error) }