You could use this to get the current location of the script being run (not the location where it runs).
readlink -f $0
You could use this to get the current location of the script being run (not the location where it runs).