Skip to content

Instantly share code, notes, and snippets.

@mandel-macaque
Created May 4, 2020 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mandel-macaque/5e622a65b6bce321f019042928bde7ed to your computer and use it in GitHub Desktop.
Save mandel-macaque/5e622a65b6bce321f019042928bde7ed to your computer and use it in GitHub Desktop.
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