ENH: in cshrc - prevent local variables from shadowing setenv variables

This commit is contained in:
Mark Olesen
2010-03-23 11:42:28 +01:00
parent 52fc076b47
commit 56a5650f5e

View File

@ -213,13 +213,15 @@ endsw
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set foamClean=$WM_PROJECT_DIR/bin/foamCleanPath set foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
#- prevent local variables from shadowing setenv variables
unset PATH MANPATH LD_LIBRARY_PATH LD_PRELOAD
if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH '' if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH ''
if (! $?MANPATH) setenv MANPATH '' if (! $?MANPATH) setenv MANPATH ''
#- Clean PATH (path) #- Clean PATH (path)
set cleaned=`$foamClean "$PATH" "$foamOldDirs"` set cleaned=`$foamClean "$PATH" "$foamOldDirs"`
if ( $status == 0 ) then if ( $status == 0 ) then
unset PATH
setenv PATH $cleaned setenv PATH $cleaned
endif endif