playframework/Play20 — pull request #20 by gre (2011-11-15 09:16:26+00:00)
Title: Fix play script to allow symbolic links

Before my commit, if I use a symlink for play like:
`ln -s /Volumes/dev/Play20/play /Users/gre/bin/play2`

My play2 symlink will not work:
`Unable to access jarfile /Users/gre/apps/framework/sbt/sbt-launch-0.11.0.jar`

because `dirname $0` give the symbolic link directory.

To fix that, here is the trick:
```PRG="$0"
while [ -h "$PRG" ] ; do
PRG=`readlink "$PRG"`
done
dir=`dirname $PRG````

found here: http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/60247#60247