Created
April 11, 2012 11:09
-
-
Save quellish/2358659 to your computer and use it in GitHub Desktop.
Run CoverStory from Xcode build script
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
exec osascript <<EOF | |
set objects_normal to system attribute "OBJECT_FILE_DIR_normal" | |
set fp to objects_normal & "/i386" | |
set posix_path to POSIX file fp | |
set appExists to false | |
tell application "Finder" | |
try | |
exists application file id "com.google.CoverStory" | |
on error | |
false | |
end try | |
set appExists to the result | |
end tell | |
if appExists | |
tell application "CoverStory" | |
close | |
quit | |
end tell | |
tell application "Xcode" | |
activate | |
end tell | |
tell application "CoverStory" | |
activate | |
close | |
try | |
open posix_path | |
on error | |
end error | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment