Commit 2d40369c authored by Youness Alaoui's avatar Youness Alaoui
Browse files

Protection against modified ME repository

Fallback on checking the filename to find instead of throwing an error
if the hash doesn't match.
parent 6a6ed1f8
......@@ -132,7 +132,9 @@ get_and_patch_me_11 () {
wget -O "$rar_filename" "$DIRECT_LINK"
sha=$(sha256sum "$rar_filename" | awk '{print $1}')
if [ "$sha" != "$SKL_ME_RAR_SHA" ]; then
die "ME Repository archive has the wrong SHA256 hash"
# We'll assume the rar file was updated again
me_dirname=$(unrar l "$rar_filename" | grep '\.\.\.D\.\.\.' | tr -s [:blank:] | cut -d' ' -f 6-)
SKL_ME_FULL_FILENAME="$me_dirname/$SKL_ME_FILENAME"
fi
fi
if ! type "$unrar" &> /dev/null; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment