Last active
October 30, 2023 08:48
-
-
Save okinjp/1588d3ff3068b974df49365c90fe8cb7 to your computer and use it in GitHub Desktop.
Get SCRIPT_DIR and REAL_SCRIPT_DIR
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 | |
# SCRIPT_DIR is the directory for scripts without considering symbolic links | |
SCRIPT_DIR=$(cd $(dirname $0); pwd) | |
# SCRIPT_DIR is the real directory for scripts with considering symbolic links | |
REAL_SCRIPT_DIR=$(cd $(dirname $(realpath $0)); pwd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment