- lazier evaluation of project name and version based on the directory
name. Avoids heuristics based on directory names unless really needed.
- cope with alternative directory locations.
For example, OpenFOAM+VERSION etc.
The combination of the two above appears to be sufficient to open up
the directory naming possibilities.
- additional -list-test option (tests for existence of directory).
- Eg, instead
if file=$(foamEtcFile filename)
then
. $file
fi
can write
eval "$(foamEtcFile -sh filename)"
Also supports -verbose reporting, which is especially useful for csh,
since it allows simplification of aliases and allows the message to
land on stderr instead of stdout.
eval `foamEtcFile -csh -verbose filename`
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.
- alternative to WM_PROJECT_INST_DIR/site for systems with locked down
installation paths (eg, when packaged as RPM or deb)
When "$WM_PROJECT_SITE" is defined, it is used in favour of
"$WM_PROJECT_INST_DIR/site"
For example, within the user ~/.OpenFOAM/<VER>/prefs.sh:
foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile -m go prefs.sh` \
&& _foamSource $foamPrefs
could be used to write a personal adjustment that also includes the
site-wide prefs.