In Mac OS X, from a shell script application's point of view, **how can I get its bundle directory path for use in a shell script**? When using the env command, it returns that the app's execution path is /, and no environment variable helps. I'm doing this because I would like to access some resources of the bundle, and because the app is not always installed in /Applications.

Thanks!