checksum verification fix

pull/9/head
Nicholas Wang 2020-06-01 20:50:02 -05:00 committed by GitHub
parent 8711429d48
commit e917483e9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -298,7 +298,7 @@ download_v2ray() {
# Verification of V2Ray archive
for LISTSUM in 'md5' 'sha1' 'sha256' 'sha512'; do
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
echo 'error: Check failed! Please check your network or try again.'
return 1