checksum verification fix
parent
8711429d48
commit
e917483e9a
|
@ -298,7 +298,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 | sed 's/.* //')"
|
CHECKSUM="$(grep ${LISTSUM^^} $ZIP_FILE.dgst | grep $SUM -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