fix if statements
This commit is contained in:
@ -31,12 +31,12 @@ echo "command: gallery-dl --config ./gallery-dl/config.json --directory $path $u
|
||||
for ((n=0;n<5;n++)); do
|
||||
gallery-dl --config ./gallery-dl/config.json --directory "$path" "$url"
|
||||
|
||||
[[ $(echo $?) -eq 0 ]] && (echo -e "${IGREEN}Success${NO_COLOR}"; break)
|
||||
[[ $(echo $?) -eq 0 ]] && echo -e "${IGREEN}Success${NO_COLOR}" && exit 0
|
||||
|
||||
echo -e "${IYELLOW}download failed${NO_COLOR}"
|
||||
|
||||
[[ $(ping -c 3 v4.ip.hopeless-cloud.xyz > /dev/null 2>&1) -ne 0 ]] && (echo -e "${IRED}no internet${NO_COLOR}"; exit 1)
|
||||
[[ $(ping -c 3 v6.ip.hopeless-cloud.xyz > /dev/null 2>&1) -ne 0 ]] && (echo -e "${IRED}no internet${NO_COLOR}"; exit 1)
|
||||
[[ $(ping -c 3 v4.ip.hopeless-cloud.xyz > /dev/null 2>&1) -ne 0 ]] && echo -e "${IRED}no internet${NO_COLOR}" && exit 1
|
||||
[[ $(ping -c 3 v6.ip.hopeless-cloud.xyz > /dev/null 2>&1) -ne 0 ]] && echo -e "${IRED}no internet${NO_COLOR}" && exit 1
|
||||
|
||||
echo -e "${IGREEN}has internet${NO_COLOR}"
|
||||
done
|
||||
|
Reference in New Issue
Block a user