refactor: remove skip verification conditions in get_macos()

This commit is contained in:
Martin Wimpress 2024-05-09 04:29:20 +01:00 committed by Martin Wimpress
parent e80cd7aeff
commit b9d0829d5d
1 changed files with 3 additions and 15 deletions

View File

@ -2080,14 +2080,6 @@ function get_macos() {
CHUNKCHECK="$(command -v chunkcheck)" CHUNKCHECK="$(command -v chunkcheck)"
fi fi
if [ -z "${CHUNKCHECK}" ]; then
read -p "ERROR! Can not find chunkcheck. Will not be able to verify image. Proceed anyway?" skipVerification
if [ "${skipVerification,,}" != "y" ] && [ "${skipVerification,,}" != "yes" ]; then
exit 1
fi
echo "Skipping verification" && skipVerification="true"
fi
OpenCore_qcow2="https://github.com/kholia/OSX-KVM/raw/master/OpenCore/OpenCore.qcow2" OpenCore_qcow2="https://github.com/kholia/OSX-KVM/raw/master/OpenCore/OpenCore.qcow2"
OVMF_CODE="https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd" OVMF_CODE="https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd"
OVMF_VARS="https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1920x1080.fd" OVMF_VARS="https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1920x1080.fd"
@ -2134,14 +2126,10 @@ function get_macos() {
fi fi
fi fi
if [ "${skipVerification}" != "true" ]; then if ! "${CHUNKCHECK}" "${VM_PATH}" 2> /dev/null; then
if ! "${CHUNKCHECK}" "${VM_PATH}" 2> /dev/null; then echo "Verification failed."
echo "Verification failed."
else
echo "Verified macOS ${RELEASE} image using chunklist."
fi
else else
echo "Skipping verification of image." echo "Verified macOS ${RELEASE} image using chunklist."
fi fi
if [ -e "${VM_PATH}/RecoveryImage.dmg" ] && [ ! -e "${VM_PATH}/RecoveryImage.img" ]; then if [ -e "${VM_PATH}/RecoveryImage.dmg" ] && [ ! -e "${VM_PATH}/RecoveryImage.img" ]; then