Created
May 3, 2018 00:44
-
-
Save raskasa/17ea4fd131bb1c755dabd97b2ba1c562 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
# Store the full directory name of the executing script, no matter where it is | |
# being called from. This will work as long as the last component of the path | |
# used to find the script is not a symlink; directory links are OK. | |
# SEE: http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
echo $DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment