[TxMt] Detecting Applications

Allan Odgaard throw-away-1 at macromates.com
Fri May 4 09:43:11 UTC 2007

On 4. May 2007, at 11:29, Simon Gregory wrote:

> I have a command that relies entirely on the applescriptability of  
> iTerm over Terminal. However as I can't guarantee that iTerm
> is installed I'm looking for a way to detect it. Does anyone have  
> any suggestions, specifically when it's not running?

We have TM_SUPPORT_PATH/bin/find_app to find the full path to  
installed applications.

 From shell you could use it e.g. like this:

if find_app >/dev/null «bundle identifier of iTerm»; then
   echo 'We got iTerm installed!'

The redirect to /dev/null is only because find_app returns the full  
path to the application.

More information about the textmate mailing list