etc/bashrc,cshrc: Simplify and automate the setting of FOAM_INST_DIR

FOAM_INST_DIR is the location of the OpenFOAM installation which defaults to
the directory containing the etc/bashrc,cshrc file.  If this default is
not appropriate FOAM_INST_DIR can be set explicitly.
This commit is contained in:
Henry Weller
2016-06-06 17:20:10 +01:00
parent bf099f1d1b
commit 4114a1e2bf
4 changed files with 35 additions and 36 deletions

View File

@ -38,8 +38,8 @@
# \endcode
#
# Note
# This script must exist in <foamInstall>/OpenFOAM-<VERSION>/bin/
# or <foamInstall>/openfoam<VERSION>/bin/ (for the debian version)
# This script must exist in $FOAM_INST_DIR/OpenFOAM-<VERSION>/bin/
# or $FOAM_INST_DIR/openfoam<VERSION>/bin/ (for the debian version)
#
# foamEtcFile must be found in the same directory as this script
#
@ -75,7 +75,7 @@ binDir="${0%/*}"
# the project dir:
projectDir="${binDir%/bin}"
# the prefix dir (same as foamInstall):
# the prefix dir (same as $FOAM_INST_DIR):
prefixDir="${projectDir%/*}"
# # the name used for the project directory