bash, run commands relative to .sh file

 

#!/bin/sh

my_dir="$(dirname "$0")"
cd $my_dir;