fix: add #! to chunkcheck and correct skipVerification for macOS

This commit is contained in:
Martin Wimpress 2024-04-17 03:46:34 +01:00 committed by Martin Wimpress
parent 3722b13ecb
commit 67ddb91915
2 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
from pathlib import Path
import struct
import hashlib
@ -61,4 +63,4 @@ def main():
check_chunklist(vmdir / 'RecoveryImage.dmg', vmdir / 'RecoveryImage.chunklist')
if __name__ == "__main__":
main()
main()

View File

@ -2418,7 +2418,7 @@ function get_macos() {
if [ "${skipVerification,,}" != "y" ] && [ "${skipVerification,,}" != "yes" ]; then
exit 1
fi
echo 'Skipping verification' && skipVerification=true
echo 'Skipping verification' && skipVerification="true"
fi
OpenCore_qcow2="https://github.com/kholia/OSX-KVM/raw/master/OpenCore/OpenCore.qcow2"
@ -2462,12 +2462,13 @@ function get_macos() {
fi
fi
if [ $skipVerification != true ]; then
if ! python3 "${CHUNKCHECK}" "${VM_PATH}" 2> /dev/null; then
if [ "${skipVerification}" != "true" ]; then
if ! "${CHUNKCHECK}" "${VM_PATH}" 2> /dev/null; then
echo "Verification failed."
exit 1
else
echo "Verified macOS ${RELEASE} image using chunklist."
fi
echo "Verified macOS ${RELEASE} image using chunklist."
else
echo "Skipping verification of image."
fi