Fix sha check

This commit is contained in:
Sandro Jäckel 2019-07-06 16:41:40 +02:00
parent 1b6c8adf28
commit 9c92ac9342
No known key found for this signature in database
GPG Key ID: 236B6291555E8401

View File

@ -67,8 +67,7 @@ update_mod()
return 1
fi
set -- "$(sha1sum "$MOD_DIR/$MOD_FILENAME")"
if [[ $1 != "$MOD_SHA1" ]]; then
if ! [[ $(sha1sum "$MOD_DIR/$MOD_FILENAME") =~ $MOD_SHA1 ]]; then
print_failure " SHA1 mismatch!"
rm "$MOD_DIR/$MOD_FILENAME"
return 1