Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
if ! "$XCODE_DEVELOPER_ROOT/usr/bin/xcodebuild" -checkFirstLaunchStatus; then
if ! test -z "$PROVISION_XCODE"; then
# Remove sudo's cache as well, otherwise nothing will happen.
$SUDO find /var/folders -name '*com.apple.dt.Xcode.InstallCheckCache*' -print -delete 2>/dev/null | sed 's/^\(.*\)$/ Deleted Xcode cache file: \1 (this is normal)/' || true
# Run the first launch tasks
log "Executing '$SUDO $XCODE_DEVELOPER_ROOT/usr/bin/xcodebuild -runFirstLaunch'"
$SUDO "$XCODE_DEVELOPER_ROOT/usr/bin/xcodebuild" -runFirstLaunch
log "Executed '$SUDO $XCODE_DEVELOPER_ROOT/usr/bin/xcodebuild -runFirstLaunch'"
else
fail "Xcode has pending first launch tasks. Execute '$XCODE_DEVELOPER_ROOT/usr/bin/xcodebuild -runFirstLaunch' to execute those tasks."
return
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment