STYLE: use new -space option from foamCleanPath

This commit is contained in:
Mark Olesen
2010-03-05 15:00:39 +01:00
parent 06910c1cd1
commit 703dda2943
4 changed files with 16 additions and 27 deletions

View File

@ -27,13 +27,14 @@
#
# Description
# Setup file for paraview-3.x
# Sourced from OpenFOAM-*/etc/bashrc
# Sourced from OpenFOAM-*/etc/bashrc or from foamPV alias
#
# Note
# The env. variable 'ParaView_DIR' is required for building plugins
# The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
# are required for building plugins
#------------------------------------------------------------------------------
#- Clean PATH
# clean the PATH
cleanedEnv=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/cmake- $WM_THIRD_PARTY_DIR/paraview-"` && PATH="$cleanedEnv"
# determine the cmake to be used
@ -61,8 +62,7 @@ case "$ParaView_VERSION" in
;;
*)
ParaView_MAJOR=$(echo $ParaView_VERSION | \
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
ParaView_MAJOR=`echo $ParaView_VERSION | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
;;
esac
export ParaView_MAJOR

View File

@ -27,19 +27,16 @@
#
# Description
# Setup file for paraview-3.x
# Sourced from OpenFOAM-*/etc/cshrc
# Sourced from OpenFOAM-*/etc/cshrc or from foamPV alias
#
# Note
# The env. variable 'ParaView_DIR' is required for building plugins
# The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
# are required for building plugins
#------------------------------------------------------------------------------
#- Clean PATH
set colonPath=`echo "$path" | sed -e 's/ /:/g'`
set cleanedEnv=`$WM_PROJECT_DIR/bin/foamCleanPath "$colonPath" "$WM_THIRD_PARTY_DIR/cmake- $WM_THIRD_PARTY_DIR/paraview-"`
if ( $status == 0 ) then
set path=`echo "$cleanedEnv" | sed -e 's/:/ /g'`
endif
# clean the PATH
set cleanedEnv=`$WM_PROJECT_DIR/bin/foamCleanPath -space "$path" "$WM_THIRD_PARTY_DIR/cmake- $WM_THIRD_PARTY_DIR/paraview-"`
if ( $status == 0 ) set path=($cleanedEnv)
# determine the cmake to be used
unsetenv CMAKE_HOME
@ -91,5 +88,5 @@ else
endif
unset cleanedEnv colonPath cmake paraviewInstDir paraviewPython
unset cleanedEnv cmake paraviewInstDir paraviewPython
# -----------------------------------------------------------------------------

View File

@ -237,7 +237,6 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.sh
# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc

View File

@ -211,11 +211,8 @@ if (! $?MANPATH) then
endif
#- Clean path/PATH
set colonPath=`echo "$path" | sed -e 's/ /:/g'`
set cleanedEnv=`$cleanProg "$colonPath" "$foamOldDirs"`
if ( $status == 0 ) then
set path=`echo "$cleanedEnv" | sed -e 's/:/ /g'`
endif
set cleanedEnv=`$cleanProg -space "$path" "$foamOldDirs"`
if ( $status == 0 ) set path=($cleanedEnv)
#- Clean LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH `$cleanProg "$LD_LIBRARY_PATH" "$foamOldDirs"`
@ -233,7 +230,6 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.csh
# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/cshrc
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc
# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc
@ -241,11 +237,8 @@ _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc
# Clean environment paths again. Only remove duplicates
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#- Clean path/PATH
set colonPath=`echo "$path" | sed -e 's/ /:/g'`
set cleanedEnv=`$cleanProg "$colonPath"`
if ( $status == 0 ) then
set path=`echo "$cleanedEnv" | sed -e 's/:/ /g'`
endif
set cleanedEnv=`$cleanProg -space "$colonPath"`
if ( $status == 0 ) set path=($cleanedEnv)
#- Clean LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH `$cleanProg "$LD_LIBRARY_PATH"`