etc/bashrc,cshrc: Use "$WM_PROJECT" rather than "OpenFOAM" in the setting of $FOAM_INST_DIR

Patch contributed by Bruno Santos
Resolves patch request http://bugs.openfoam.org/view.php?id=2112
This commit is contained in:
Henry Weller 2016-06-08 11:51:21 +01:00
parent c93dcf98a6
commit 70f3947c48
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ export WM_PROJECT_VERSION=dev
#
[ $BASH_SOURCE ] && \
export FOAM_INST_DIR=${BASH_SOURCE%/*/*/*} || \
export FOAM_INST_DIR=$HOME/OpenFOAM
export FOAM_INST_DIR=$HOME/$WM_PROJECT
# export FOAM_INST_DIR=~$WM_PROJECT
# export FOAM_INST_DIR=/opt/$WM_PROJECT
# export FOAM_INST_DIR=/usr/local/$WM_PROJECT

View File

@ -41,8 +41,8 @@ setenv WM_PROJECT_VERSION dev
#
# Please set to the appropriate path if the default is not correct.
#
setenv FOAM_INST_DIR `lsof +p $$ |& grep -oE '/.*OpenFOAM[^/]*/etc/cshrc' | \
sed 's%/OpenFOAM[^/]*/etc/cshrc%%'`
setenv FOAM_INST_DIR `lsof +p $$ |& grep -oE '/.*'$WM_PROJECT'[^/]*/etc/cshrc' | \
sed 's%/'$WM_PROJECT'[^/]*/etc/cshrc%%'`
echo $FOAM_INST_DIR
# setenv FOAM_INST_DIR $HOME/$WM_PROJECT
# setenv FOAM_INST_DIR ~$WM_PROJECT