etc/bashrc: Added support for sourcing etc/bashrc with relative path

Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2310
This commit is contained in:
Henry Weller
2016-11-04 13:12:30 +00:00
parent b5206472b5
commit 535831422e

View File

@ -43,7 +43,7 @@ export WM_PROJECT_VERSION=dev
# Please set to the appropriate path if the default is not correct. # Please set to the appropriate path if the default is not correct.
# #
[ $BASH_SOURCE ] && \ [ $BASH_SOURCE ] && \
export FOAM_INST_DIR=$(cd ${BASH_SOURCE%/*/*/*} && pwd -P) || \ export FOAM_INST_DIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) || \
export FOAM_INST_DIR=$HOME/$WM_PROJECT export FOAM_INST_DIR=$HOME/$WM_PROJECT
# export FOAM_INST_DIR=~$WM_PROJECT # export FOAM_INST_DIR=~$WM_PROJECT
# export FOAM_INST_DIR=/opt/$WM_PROJECT # export FOAM_INST_DIR=/opt/$WM_PROJECT