mirror of
https://github.com/arkenfox/user.js.git
synced 2025-05-21 08:07:09 +02:00
Use direct check for existence of file
This commit is contained in:
parent
1c6d633144
commit
9453cec4aa
1 changed files with 2 additions and 2 deletions
|
@ -41,9 +41,9 @@ ESR=false
|
||||||
|
|
||||||
# Download method priority: curl -> wget
|
# Download method priority: curl -> wget
|
||||||
DOWNLOAD_METHOD=''
|
DOWNLOAD_METHOD=''
|
||||||
if [[ $(command -v 'curl') ]]; then
|
if command -v curl >/dev/null; then
|
||||||
DOWNLOAD_METHOD='curl --max-redirs 3 -so'
|
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'
|
DOWNLOAD_METHOD='wget --max-redirect 3 --quiet -O'
|
||||||
else
|
else
|
||||||
echo -e "${RED}This script requires curl or wget.\nProcess aborted${NC}"
|
echo -e "${RED}This script requires curl or wget.\nProcess aborted${NC}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue