ENH: source 'other' prefs before user/group

- this allows the sys-admin to provide base values independent of any
  WM_PROJECT_SITE value.
This commit is contained in:
Mark Olesen
2017-03-22 15:33:51 +01:00
parent ace5565f96
commit 1be180b99f
2 changed files with 10 additions and 6 deletions

View File

@ -139,11 +139,13 @@ export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
# ~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~
. $WM_PROJECT_DIR/etc/config.sh/functions . $WM_PROJECT_DIR/etc/config.sh/functions
# Add in preset user or site preferences: # Override definitions via prefs, with 'other' first so the sys-admin
_foamEtc prefs.sh # can provide base values independent of WM_PROJECT_SITE
_foamEtc -mode=o prefs.sh
_foamEtc -mode=ug prefs.sh
# Evaluate command-line parameters and record settings for later. # Evaluate command-line parameters and record settings for later.
# These can be used to set/unset values, or specify alternative pref files. # These can be used to set/unset values, specify additional files etc.
export FOAM_SETTINGS="$@" export FOAM_SETTINGS="$@"
_foamEval $@ _foamEval $@

View File

@ -152,11 +152,13 @@ else
alias _foamEtc 'eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh \!*`' alias _foamEtc 'eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh \!*`'
endif endif
# Add in preset user or site preferences: # Override definitions via prefs, with 'other' first so the sys-admin
_foamEtc prefs.csh # can provide base values independent of WM_PROJECT_SITE
_foamEtc -mode=o prefs.csh
_foamEtc -mode=ug prefs.csh
# Evaluate command-line parameters and record settings for later. # Evaluate command-line parameters and record settings for later.
# These can be used to set/unset values, or specify alternative pref files. # These can be used to set/unset values, specify additional files etc.
setenv FOAM_SETTINGS "${*}" setenv FOAM_SETTINGS "${*}"
while ( $#argv > 0 ) while ( $#argv > 0 )
switch ($argv[1]) switch ($argv[1])