Created
June 17, 2011 11:22
-
-
Save muhqu/1031241 to your computer and use it in GitHub Desktop.
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 | |
# | |
# lets you run xcode from any subdirectory of your project | |
# | |
function findproj { | |
if [ "/" != "$1" ]; then | |
p=$(basename $1/*.xcodeproj); | |
if [ "*.xcodeproj" = "$p" ]; then | |
up=$(dirname $1); | |
if [ "/" != "$up" ]; then | |
findproj "$up"; | |
else | |
exit | |
fi | |
else | |
echo $1/$p; | |
fi | |
fi | |
} | |
proj=$(findproj $(pwd)) | |
#echo proj: $proj | |
open -a /Xcode4/Applications/Xcode.app $proj $(pwd)/$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment