mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: more tuning parameters for user environment
- FOAM_CONFIG_NOUSER Suppress use of user/group configuration files. This is useful when packaging for a central installation. - allow additional user tuning of compiler settings. Per-compiler overrides in "compiler-$WM_COMPILER" files
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
# Description
|
||||
# Shell functions and variables used when sourcing the OpenFOAM environment
|
||||
#
|
||||
# Some functionality is shadowed in bin/tools/lib-dir
|
||||
# Some functionality mirrored by bin/tools/lib-dir
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -33,11 +33,27 @@ then
|
||||
# Cleaning environment variables
|
||||
_foamClean()
|
||||
{
|
||||
local var=$1
|
||||
foamVar_name=$1
|
||||
shift
|
||||
eval $($WM_PROJECT_DIR/bin/foamCleanPath -sh-env=$var "$@")
|
||||
eval $($WM_PROJECT_DIR/bin/foamCleanPath -sh-env=$foamVar_name "$@")
|
||||
unset foamVar_name
|
||||
}
|
||||
|
||||
# Source an etc file, possibly with some verbosity
|
||||
# - use eval to avoid intermediate variables (ksh doesn't have 'local')
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
_foamEtc()
|
||||
{
|
||||
eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh-verbose ${FOAM_CONFIG_NOUSER:+-mode=o} $@)";
|
||||
}
|
||||
else
|
||||
_foamEtc()
|
||||
{
|
||||
eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh ${FOAM_CONFIG_NOUSER:+-mode=o} $@)";
|
||||
}
|
||||
fi
|
||||
|
||||
# Prepend PATH
|
||||
_foamAddPath()
|
||||
{
|
||||
@ -133,15 +149,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
# Source an etc file, possibly with some verbosity
|
||||
# - use eval to avoid intermediate variables (ksh doesn't have 'local')
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
_foamEtc(){ eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh-verbose $@)"; }
|
||||
else
|
||||
_foamEtc(){ eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh $@)"; }
|
||||
fi
|
||||
|
||||
# Evaluate command-line parameters
|
||||
_foamEval()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user