Use direct check for existence of file

This commit is contained in:
a1346054 2021-09-21 16:00:15 +00:00
parent 1c6d633144
commit 9453cec4aa
No known key found for this signature in database
GPG Key ID: D149AD21DC40440C

View File

@ -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}"