Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
603aa1e6
Commit
603aa1e6
authored
Dec 22, 2010
by
Mark Olesen
Browse files
ENH: preserve command-line settings in FOAM_SETTINGS
parent
4f2fde20
Changes
4
Hide whitespace changes
Inline
Side-by-side
bin/mpirunDebug
View file @
603aa1e6
...
...
@@ -142,14 +142,15 @@ fi
# Construct test string for remote execution.
# Source OpenFOAM settings if OpenFOAM environment not set.
# attempt to preserve the installation directory 'FOAM_INST_DIR'
# use FOAM_SETTINGS to pass command-line settings
if
[
"
$FOAM_INST_DIR
"
]
then
sourceFoam
=
'[ "$WM_PROJECT" ] || '
"FOAM_INST_DIR=
$FOAM_INST_DIR
.
$sourceFoam
"
sourceFoam
=
'[ "$WM_PROJECT" ] || '
"FOAM_INST_DIR=
$FOAM_INST_DIR
.
$sourceFoam
$FOAM_SETTINGS
"
else
sourceFoam
=
'[ "$WM_PROJECT" ] || '
".
$sourceFoam
"
sourceFoam
=
'[ "$WM_PROJECT" ] || '
".
$sourceFoam
$FOAM_SETTINGS
"
fi
echo
"**sourceFoam:
$sourceFoam
"
echo
"**sourceFoam:
$sourceFoam
$FOAM_SETTINGS
"
rm
-f
$PWD
/mpirun.schema
touch
$PWD
/mpirun.schema
...
...
etc/bashrc
View file @
603aa1e6
...
...
@@ -89,7 +89,8 @@ _foamSource()
# Add in preset user or site preferences:
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile prefs.sh
`
# Evaluate command-line parameters
# Evaluate command-line parameters and record settings for later
export
FOAM_SETTINGS
=
"
$@
"
while
[
$#
-gt
0
]
do
case
"
$1
"
in
...
...
etc/cshrc
View file @
603aa1e6
...
...
@@ -74,7 +74,8 @@ alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!*
# Add in preset user or site preferences:
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile prefs.csh
`
# Evaluate command-line parameters
# Evaluate command-line parameters and record settings for later
setenv FOAM_SETTINGS
"
${
*
}
"
while
(
$#argv
>
0
)
switch
(
$argv
[
1]
)
case
*
=
:
...
...
wmake/wmakeScheduler
View file @
603aa1e6
...
...
@@ -108,19 +108,20 @@ fi
# Construct test string for remote execution.
# Source WM_PROJECT settings if WM_PROJECT environment not set.
# attempt to preserve the installation directory 'FOAM_INST_DIR'
# use FOAM_SETTINGS to pass command-line settings
case
$sourceFoam
in
*
/bashrc
)
if
[
"
$FOAM_INST_DIR
"
]
then
sourceFoam
=
'[ "$WM_PROJECT" ] || '
"FOAM_INST_DIR=
$FOAM_INST_DIR
.
$sourceFoam
"
sourceFoam
=
'[ "$WM_PROJECT" ] || '
"FOAM_INST_DIR=
$FOAM_INST_DIR
.
$sourceFoam
$FOAM_SETTINGS
"
else
sourceFoam
=
'[ "$WM_PROJECT" ] || '
".
$sourceFoam
"
sourceFoam
=
'[ "$WM_PROJECT" ] || '
".
$sourceFoam
$FOAM_SETTINGS
"
fi
;;
*
/cshrc
)
# TODO: csh equivalent to bash code (preserving FOAM_INST_DIR)
sourceFoam
=
'if ( ! $?WM_PROJECT ) source '
"
$sourceFoam
"
sourceFoam
=
'if ( ! $?WM_PROJECT ) source '
"
$sourceFoam
$FOAM_SETTINGS
"
;;
esac
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment