We want source to look for file .environment in the same directory as setup.sh itself, not in the user's PATH. Indeed I had other software with an .environment file in my PATH. Perhaps that's bad practice but that's beyond my control. If we follow the installation instructions, setup.sh is in the current directory because we run it as ./setup.sh.
Read and execute commands from the filename argument in the current shell context. If filename does not contain a slash, the PATH variable is used to find filename. When Bash is not in POSIX mode, the current directory is searched if filename is not found in $PATH.
We want source to look for file
.environment
in the same directory assetup.sh
itself, not in the user'sPATH
. Indeed I had other software with an.environment
file in myPATH
. Perhaps that's bad practice but that's beyond my control. If we follow the installation instructions,setup.sh
is in the current directory because we run it as./setup.sh
.From the Bash Reference Manual:
Fixes #48.