Improve error handling if Xcode xip file isn't readable

Fixes #140.
This commit is contained in:
Rémi Verschelde 2024-05-06 22:20:29 +02:00
parent 41400a8922
commit 6cfed75f1e
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 4 additions and 2 deletions

View File

@ -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