-
-
Save feosuna1/396c41d3da60081ee7b207c01e4d16c5 to your computer and use it in GitHub Desktop.
Command line script for opening Xcode in the current working directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| XCODE_APP=$(xcode-select -p) | |
| XCODE_APP="${XCODE_APP%%.app*}.app" | |
| if [[ -z "${XCODE_APP// }" ]]; then | |
| echo "Unable to find path for Xcode installation. Install Xcode." | |
| exit 1 | |
| fi | |
| echo "Opening Xcode..." | |
| open -a "${XCODE_APP}" "${@:-.}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment