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 048a3a7ada
commit b7243e2d19
4 changed files with 35 additions and 36 deletions

View File

@ -39,8 +39,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)
#
#-------------------------------------------------------------------------------
usage() {
@ -86,7 +86,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