Recuperer le chemin d’un script bash

getScriptPath () {
	echo ${0%/*}/
}
currentPath=$(getScriptPath)
cd $currentPath