- unknown options or missing option values now emit a shorter message
without the entire usage. This makes it easier to identify the errors
and is better aligned with the behaviour of GNU system tools.
====
$ simpleFoam -case
Using: OpenFOAM-plus (see www.OpenFOAM.com)
Build: plus-01234
Error: option '-case' requires an argument
See 'simpleFoam -help' for usage
====
- provide for reduced (-help) and full (-help-full) usage information.
In many cases the reduced usage provided sufficient and easier
to find the information.
- make -srcDoc an alias for -doc-source
- no warnings about option aliases for future dates.
Examples,
wmakePrintBuild -plus
Check if value is known
(ie, everything configured and also OpenFOAM+):
if wmakePrintBuild -plus >/dev/null 2>&1
then
echo YES
else
echo NO
fi
Check if version is new enough
if ofver=$(wmakePrintBuild -plus 2>/dev/null) && [ "$ofver" -ge 1612 ]
then
echo YES
else
echo NO
fi
Conditionals
ofver=$(wmakePrintBuild -plus 2>/dev/null)
case "${ofver:=0}" in
1612)
echo "something for 1612
;;
1706)
echo "something for 1706
;;
esac
- return 0 if not under git, since nothing particular can be said
about the build number.
- explicitly define which git-dir is to be used.
This ensure we don't accidentally get some values from some unrelated
project in the parent directory.
The Makefiles are now in the makefiles sub-directory
The "-f | -force" option in wmakeLnInclude is now "-u | -update" for
consistency with the other scripts.
The "Usage" entry in the headers is now consistently formatted in all
scripts.
- improves the chances of tracking who built OpenFOAM, where, etc
ENH: make it easier to parse version/build from OpenFOAM -help output
- For example,
foamListTimes -help | awk '{ if (/^Using:/) print $2}'
foamListTimes -help | awk '{ if (/^Build:/) print $2}'
- added wmakePrintBuild -check, -update, -version options
- only update .build cache when explictly requested and
from within the wmake Cver rules
- use -check option to avoid unnecessary remake in src/Allwmake