[TxMt] Detecting Applications

Allan Odgaard throw-away-1 at macromates.com
Sat May 5 08:34:02 UTC 2007

On 4. May 2007, at 15:56, Simon Gregory wrote:

>> if find_app >/dev/null «bundle identifier of iTerm»; then
>>   echo 'We got iTerm installed!'
>> fi
> I'm assuming that the «bundle identifier of iTerm» is the value  
> from this key found in iTerm.app/Contents/Info.plist
> <key>CFBundleIdentifier</key>
> <string>iTerm</string>

Yes, unfortunately that bundle identifier is in the wrong format. It  
should be something like: “com.«company».iTerm”.

It will likely work though. Alternatively you can do: find_app  
iTerm.app (then it looks using the app name instead of the bundle  
identifier, normally the former would be more ambiguous).

> One thing, would iTerm need to have been run once in order for the  
> system to register it's presence?

If it is in /Applications and possibly ~/Applications, the system  
will automatically register the application (at boot time) -- maybe  
some other locations are also magic.

But at least running the app, will ensure the system has it in the  

More information about the textmate mailing list