mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: avoid stray options affecting _foamEval, pass FOAM_SETTINGS to foamExec
This commit is contained in:
@ -122,7 +122,7 @@ sourceRc()
|
|||||||
# extra safety when sourcing the bashrc
|
# extra safety when sourcing the bashrc
|
||||||
[ -n "$prefix" ] && export FOAM_INST_DIR="$prefix"
|
[ -n "$prefix" ] && export FOAM_INST_DIR="$prefix"
|
||||||
|
|
||||||
. $foamDotFile
|
. $foamDotFile $FOAM_SETTINGS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -144,6 +144,10 @@ _foamEval()
|
|||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
-*)
|
||||||
|
# stray option (not meant for us here) -> get out
|
||||||
|
break
|
||||||
|
;;
|
||||||
*=)
|
*=)
|
||||||
# name= -> unset name
|
# name= -> unset name
|
||||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}"
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}"
|
||||||
|
|||||||
@ -142,6 +142,10 @@ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
|
|||||||
setenv FOAM_SETTINGS "${*}"
|
setenv FOAM_SETTINGS "${*}"
|
||||||
while ( $#argv > 0 )
|
while ( $#argv > 0 )
|
||||||
switch ($argv[1])
|
switch ($argv[1])
|
||||||
|
case -*:
|
||||||
|
# stray option (not meant for us here) -> get out
|
||||||
|
break
|
||||||
|
breaksw
|
||||||
case *=:
|
case *=:
|
||||||
# name= -> unsetenv name
|
# name= -> unsetenv name
|
||||||
if ($?FOAM_VERBOSE && $?prompt) echo "unsetenv $argv[1]:s/=//"
|
if ($?FOAM_VERBOSE && $?prompt) echo "unsetenv $argv[1]:s/=//"
|
||||||
|
|||||||
Reference in New Issue
Block a user