If you need to know the path to an executing bash script from itself:

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"