Created
August 13, 2017 06:51
-
-
Save Revolucent/3f346d2980c76501c5cab112050ef5ba to your computer and use it in GitHub Desktop.
Launch project in current directory with selected Xcode
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
#!/bin/bash | |
XCODE='Xcode'; | |
XCODEPATH="$(xcode-select -p)"; | |
if [[ $XCODEPATH =~ /([^/]+)\.app ]]; then | |
XCODE="${BASH_REMATCH[1]}" | |
fi; | |
open -a "$XCODE" "${1:-.}"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation
~/bin
or/usr/local/bin
.xcode
.chmod +x xcode
Make it executable.Usage
xcode
and it will open in Xcodexcode-select -s
to activate another Xcode, such as the current beta.xcode
and the project will be opened in the selected Xcode.