OS X Fun with Shell Scripts

Discovered this the other day, and it’s just so cool (and yet so useless). In OS X land, one can make a .app directory structure to create an application bundle and the actual executable doesn’t have to be a Cocoa / Carbon application. It can actually be a shell script, or a C program, or Perl, or whatever. Double click goodness and everything. And most importantly to me, it can be added to the per-user login items, without popping up a terminal window (which is what happens if you just add a script with a .command extension). So I have a little shell script application bundle that runs at login on the desktops in the lab to make sure that there’s all the scratch directories I want on our scratch disks (so that things like Safari’s cache are on local, fast disk instead of global, slow NFS). Woo Apple — every now and then, they do get something right. Credit must go to MacEnterprise.org for the hint.