Open Bash (a.k.a. Terminal) from Finder and Vice Versa
GUI’s are great. And so are shells. Here’s how you can have the best of both worlds with minimal mucking around:
Finder to Bash
Create this a simple apple script (see code below, after the jump) in the ‘AppleScript Editor’, save as an Application, and drag it into your Finder’s toolbar. Clicking this button will open that folder in bash! If you’re clever, you can open the package contents of ‘Terminal’, copy the icon file, then open the contents of your script application, find the icon and replace it with the Termainal one. Or if you’re lazy (and trusting) you can just download the one I prepared earlier.
In Lion you can also enable this as a right-click service of folders, go to System Preferences > Keyboard > Keyboard Shortcuts > Services and enable New Terminal at Folder or New Terminal Tab at Folder, then you can right click -> Services on any folder in finder and open it in Finder that way. You can also assign a keyboard shortcut.
Bash to Finder
If you’re in bash, you can simply open . to open the current directory in Finder (or open path/to/folder to open a different one). open-ing a file will also launch that file in the default app. Neat.
dSYM Archive Script
Archiving dSYM for production builds is a good idea.
An easy way to do it is to add a build script at the end of your build.
in XCode->Targets->YourBuildName
right click, and select Add -> New Build Phase -> New Run Script Build Phase
and copy in this script. ArchiveDSYMScript
Repeat for all targets. Ensure the order is after the ‘Link Binary With Libaries’ task.
NB. This excludes “Debug” and “Release” build types, as I use “Distribution” and “Distribution Ad-Hoc” for my distribution builds. Easy to change, if you need.


