SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
bash: script_dir one liner
here’s the small one liner to get the current directory of a script executed
thanks to
IN THE NAME OF GOD, THE MOST BENEFICENT, THE MOST MERCIFUL
here’s the small one liner to get the current directory of a script executed
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
thanks to