mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -71,7 +71,7 @@ while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h* | -help*) printHelp ;;
|
||||
-f | -force) optForce=true ;;
|
||||
-f | -force) optForce=true ;;
|
||||
|
||||
-root=*)
|
||||
rootDir="${1#*=}"
|
||||
@ -148,10 +148,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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user