STYLE: avoid intermediate variables when calling _foamSource (csh)

This commit is contained in:
Mark Olesen
2010-11-09 11:47:55 +01:00
parent 08b27669da
commit be9fe276a6

View File

@ -69,14 +69,10 @@ setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
# Source files, possibly with some verbosity # Source files, possibly with some verbosity
alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; source \!*' alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!* != "") source \!*'
# Add in preset user or site preferences: # Add in preset user or site preferences:
set foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
if ( $status == 0 ) then
_foamSource $foamPrefs
endif
unset foamPrefs
# Evaluate command-line parameters # Evaluate command-line parameters
while ( $#argv > 0 ) while ( $#argv > 0 )
@ -255,17 +251,8 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.csh
# Source user setup files for optional packages # Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set paraview3=`$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/cshrc` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/cshrc`
if ( $status == 0 ) then _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/cshrc`
_foamSource $paraview3
endif
unset paraview3
set ensight=`$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/cshrc`
if ( $status == 0 ) then
_foamSource $ensight
endif
unset ensight
# Clean environment paths again. Only remove duplicates # Clean environment paths again. Only remove duplicates