Output log SHA1sum on verifying IPSW

This commit is contained in:
LukeZGD 2021-08-21 16:53:54 +08:00
parent 091f866270
commit b6252ba4db

View File

@ -142,7 +142,9 @@ Downgrade() {
if [[ $Verify == 1 ]]; then if [[ $Verify == 1 ]]; then
Log "Verifying IPSW..." Log "Verifying IPSW..."
IPSWSHA1=$(cat $Firmware/$BuildVer/sha1sum) IPSWSHA1=$(cat $Firmware/$BuildVer/sha1sum)
Log "Expected SHA1sum: $IPSWSHA1"
IPSWSHA1L=$(shasum $IPSW.ipsw | awk '{print $1}') IPSWSHA1L=$(shasum $IPSW.ipsw | awk '{print $1}')
Log "Actual SHA1sum: $IPSWSHA1L"
if [[ $IPSWSHA1L != $IPSWSHA1 ]]; then if [[ $IPSWSHA1L != $IPSWSHA1 ]]; then
Error "Verifying IPSW failed. Your IPSW may be corrupted or incomplete." \ Error "Verifying IPSW failed. Your IPSW may be corrupted or incomplete." \
"Delete/replace the IPSW and run the script again" "Delete/replace the IPSW and run the script again"