Closed julienw closed 7 years ago
After a few tries, here is a way to find the directory where the script is in bash:
source_dir=$( cd "$(dirname "$0")" ; pwd )
This is more complex than dirname $0 but gives you the full normalized directory.
dirname $0
Then we can use it to replace the name in the startup file.
After a few tries, here is a way to find the directory where the script is in bash:
This is more complex than
dirname $0
but gives you the full normalized directory.Then we can use it to replace the name in the startup file.