Created
April 21, 2019 01:35
-
-
Save diegoulloao/5ac3d50f87510bd1505ab371547d673b to your computer and use it in GitHub Desktop.
Get current script called directory no matter where called.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
# from https://stackoverflow.com/questions/59895/get-the-source-directory-of-a-bash-script-from-within-the-script-itself |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment