Fix Checksum
parent
a9c7b8d491
commit
d7c211df58
|
@ -304,7 +304,7 @@ download_v2ray() {
|
||||||
# Verification of V2Ray archive
|
# Verification of V2Ray archive
|
||||||
for LISTSUM in 'md5' 'sha1' 'sha256' 'sha512'; do
|
for LISTSUM in 'md5' 'sha1' 'sha256' 'sha512'; do
|
||||||
SUM="$(${LISTSUM}sum "$ZIP_FILE" | sed 's/ .*//')"
|
SUM="$(${LISTSUM}sum "$ZIP_FILE" | sed 's/ .*//')"
|
||||||
CHECKSUM="$(grep ${LISTSUM^^} "$ZIP_FILE".dgst | grep "$SUM" -o -a | uniq)"
|
CHECKSUM="$(grep $SUM "$ZIP_FILE".dgst -o -a | uniq)"
|
||||||
if [[ "$SUM" != "$CHECKSUM" ]]; then
|
if [[ "$SUM" != "$CHECKSUM" ]]; then
|
||||||
echo 'error: Check failed! Please check your network or try again.'
|
echo 'error: Check failed! Please check your network or try again.'
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in New Issue