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
# -----------------------------------------------------------------------------