CONFIG: inline _foamEval within <etc/config.sh/setup>

- previously a function (unlike the csh version) but since bashrc and
  setup have been split -> replace with inline definition

STYLE: formatting/wording for openfoam starters

TUT: simplify controlDict modification, add default substitution

ENH: accept '/' for end-of-options terminator (etc/openfoam)

- makes the application or service more apparent.
  * eg.  /usr/bin/openfoam / blockMesh
  * vs.  /usr/bin/openfoam -- blockMesh

  Accept lone '-' as the end-of-options terminator, as per bash

- Adjust handling of openfoam '-c' option to flag that a command-string
  will appear, but continue with option parsing.
  Consistent with bash definition.
This commit is contained in:
Mark Olesen
2021-06-16 10:06:16 +02:00
parent 7d2a9fad1a
commit e2148b587e
7 changed files with 118 additions and 112 deletions

View File

@ -151,10 +151,10 @@ modifyCaseControlDict()
do
cp -f "${dict}" "${dict}.orig"
sed \
-e 's/\(startFrom[ \t]*\)\([A-Za-z]*\);/\1 latestTime;/' \
-e 's/\(stopAt[ \t]*\)\([A-Za-z]*\);/\1 nextWrite;/' \
-e 's/\(writeControl[ \t]*\)\([A-Za-z]*\);/\1 timeStep;/' \
-e 's/\(writeInterval[ \t]*\)\([-.0-9A-Za-z]*\);/\1 '"$optRunLimit"';/' \
-e 's/\(startFrom[ \t]*\)[^ \t;]*;/\1 latestTime;/' \
-e 's/\(stopAt[ \t]*\)[^ \t;]*;/\1 nextWrite;/' \
-e 's/\(writeControl[ \t]*\)[^ \t;]*;/\1 timeStep;/' \
-e 's/\(writeInterval[ \t]*\)[^ \t;]*;/\1 '"${optRunLimit:-1}"';/' \
"${dict}.orig" > "${dict}"
done
}