Skip to content

Instantly share code, notes, and snippets.

@quellish
Created April 11, 2012 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quellish/2358659 to your computer and use it in GitHub Desktop.
Save quellish/2358659 to your computer and use it in GitHub Desktop.
Run CoverStory from Xcode build script
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