bash change to script directory

C++
cd "$(dirname "${BASH_SOURCE[0]}")"
Source

Also in C++: