run bash script in its directory

C++
#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")"
Source

Also in C++: