try to modify the check instruction
parent
2278203c14
commit
4b7faf1d11
|
@ -155,8 +155,8 @@ downloadV2Ray(){
|
|||
colorEcho ${RED} "Failed to download! Please check your network or try again."
|
||||
return 3
|
||||
fi
|
||||
for LISTSUM in 'md5sum' 'sha1sum' 'sha256sum' 'sha512sum'; do
|
||||
SUM="$($LISTSUM $ZIPFILE | sed 's/.* //')"
|
||||
for LISTSUM in 'md5' 'sha1' 'sha256' 'sha512'; do
|
||||
SUM="$(${LISTSUM}sum $ZIPFILE | sed 's/.* //')"
|
||||
CHECKSUM="$(grep ${LISTSUM^^} $ZIPFILE.dgst | sed 's/.* //')"
|
||||
if [[ "$SUM" != "$CHECKSUM" ]]; then
|
||||
colorEcho "$RED" 'Check failed! Please check your network or try again.'
|
||||
|
|
Loading…
Reference in New Issue