So the situaton is this, you depend on things being relevant to where your bash script is and to be safe you want it to be dynamic (eg. do not hard code that we switch to /abc/dir but rather detect where script.sh is located).
scriptlocation="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
The path is then contained the the variable "scriptlocation" so you can cd to it in your script etc....
bash, directory, howto, tutorialso, situaton, relevant, dynamic, eg, abc, dir, detect, sh, located, scriptlocation, quot, dirname, bash_source, pwd, contained, variable, etc,