From 9c92ac9342ef2a76bb5ea81ed92841fb889dded8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Jul 2019 16:41:40 +0200 Subject: [PATCH] Fix sha check --- 0.17/files/update-mods.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/0.17/files/update-mods.sh b/0.17/files/update-mods.sh index d38598c..8d90c5d 100755 --- a/0.17/files/update-mods.sh +++ b/0.17/files/update-mods.sh @@ -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