Created
February 23, 2020 19:28
-
-
Save thefotes/0021479be7e55d713a50198a188b252f to your computer and use it in GitHub Desktop.
Opens either xcodeproj or xcworkspace in CWD
This file contains 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 | |
set -e | |
xcodeproj=`find . -maxdepth 1 -name "*.xcodeproj"` | |
proj_name=`echo $xcodeproj | sed 's/.\///g' | sed 's/.xcodeproj//g'` | |
xcworkspace=`find . -maxdepth 1 -name "$proj_name.xcworkspace"` | |
if [[ ! -z $xcworkspace && -e $xcworkspace ]]; then | |
open $xcworkspace | |
else | |
open $xcodeproj | |
fi |
Thanks for the info,
xed
has been pretty fast for me. My big issue is that if it can't find something to open it gets slow, pops an alert within Xcode, and the exits cleanly (instead of exiting with an error code). I ended up rolling my own script as well.
Right on 🤙
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the info,
xed
has been pretty fast for me. My big issue is that if it can't find something to open it gets slow, pops an alert within Xcode, and the exits cleanly (instead of exiting with an error code). I ended up rolling my own script as well.