From 9453cec4aa737dc0c049c3d3c184356974e34b23 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Tue, 21 Sep 2021 16:00:15 +0000 Subject: [PATCH] Use direct check for existence of file --- updater.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updater.sh b/updater.sh index 6f761c9..f8bc52c 100755 --- a/updater.sh +++ b/updater.sh @@ -41,9 +41,9 @@ ESR=false # Download method priority: curl -> wget DOWNLOAD_METHOD='' -if [[ $(command -v 'curl') ]]; then +if command -v curl >/dev/null; then DOWNLOAD_METHOD='curl --max-redirs 3 -so' -elif [[ $(command -v 'wget') ]]; then +elif command -v wget >/dev/null; then DOWNLOAD_METHOD='wget --max-redirect 3 --quiet -O' else echo -e "${RED}This script requires curl or wget.\nProcess aborted${NC}"