From 6cfed75f1ea4db19502d97d0fbf874d26f24f1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 6 May 2024 22:20:29 +0200 Subject: [PATCH] Improve error handling if Xcode xip file isn't readable Fixes #140. --- build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 75b120d..ff38756 100755 --- a/build.sh +++ b/build.sh @@ -62,8 +62,10 @@ XCODE_SDK=15.2 OSX_SDK=14.2 IOS_SDK=17.2 if [ ! -e "${files_root}"/MacOSX${OSX_SDK}.sdk.tar.xz ] || [ ! -e "${files_root}"/iPhoneOS${IOS_SDK}.sdk.tar.xz ] || [ ! -e "${files_root}"/iPhoneSimulator${IOS_SDK}.sdk.tar.xz ]; then - if [ ! -e "${files_root}"/Xcode_${XCODE_SDK}.xip ]; then - echo "files/Xcode_${XCODE_SDK}.xip is required. It can be downloaded from https://developer.apple.com/download/more/ with a valid apple ID." + if [ ! -r "${files_root}"/Xcode_${XCODE_SDK}.xip ]; then + echo + echo "Error: 'files/Xcode_${XCODE_SDK}.xip' is required for Apple platforms, but was not found or couldn't be read." + echo "It can be downloaded from https://developer.apple.com/download/more/ with a valid apple ID." exit 1 fi