From 0a37749a578ee2d2e7d22a4c9f4f397330bc0c5c Mon Sep 17 00:00:00 2001 From: CHOI WOEN-SUG Date: Mon, 16 Sep 2024 11:42:30 +0900 Subject: [PATCH] Update install.sh --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 1ce3c9c..47c2774 100755 --- a/install.sh +++ b/install.sh @@ -203,11 +203,13 @@ if [ "$(xcode-select -p)" != "/Applications/Xcode.app/Contents/Developer" ]; the sudo xcode-select -s "/Applications/Xcode.app/Contents/Developer" XCODE_VERSION=$(xcodebuild -version | grep '^Xcode\s' | sed -E 's/^Xcode[[:space:]]+([0-9\.]+)/\1/') ACCEPTED_LICENSE_VERSION=$(defaults read /Library/Preferences/com.apple.dt.Xcode 2> /dev/null | grep IDEXcodeVersionForAgreedToGMLicense | cut -d '"' -f 2) - sudo xcodebuild -license + sudo xcodebuild -license accept + echo $XCODE_VERSION + echo $ACCEPTED_LICENSE_VERSION # Check if the Xcode license has been accepted if [ "$XCODE_VERSION" != "$ACCEPTED_LICENSE_VERSION" ]; then echo -e "\033[33m⚠️ WARNING: Xcode license needs to be accepted. Please follow the prompts to accept the license.\033[0m" - sudo xcodebuild -license + sudo xcodebuild -license accept # shellcheck disable=SC2181 if [ $? -ne 0 ]; then echo -e "\033[31m❌ Error: Failed to accept Xcode license. Please try again.\033[0m"