How do I get the path of app in its launch script?
You can use this code:

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &amp;&amp; pwd )"
echo $DIR &gt;  /Users/me/temp/outLog.txt


It'll give you path to the MacOS folder of you app.

Here's great stackoverflow answer about this.