diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index 7968344..94fc562 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -41,11 +41,21 @@ # setParaViewDirs() { - ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION + set -- "ParaView-$ParaView_VERSION" "ParaView-v$ParaView_VERSION" + + unset ParaView_SOURCE_DIR + for i + do + ParaView_SOURCE_DIR="$WM_THIRD_PARTY_DIR/$i" + [ -d "$ParaView_SOURCE_DIR" ] && break + done [ -d "$ParaView_SOURCE_DIR" ] || { - echo "did not find ParaView-$ParaView_VERSION in these directories:" - echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" + echo "Did not locate ParaView version:" + while [ "$#" -ge 1 ]; do echo " $1"; shift; done + echo + echo "In the directory:" + echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" echo echo "abort build" exit 1 diff --git a/etc/tools/vtkFunctions b/etc/tools/vtkFunctions index a87e4e0..89e2392 100644 --- a/etc/tools/vtkFunctions +++ b/etc/tools/vtkFunctions @@ -42,11 +42,21 @@ # setVtkDirs() { - VTK_SOURCE_DIR=$WM_THIRD_PARTY_DIR/VTK-$VTK_VERSION + set -- "VTK-$VTK_VERSION" "VTK-v$VTK_VERSION" + unset VTK_SOURCE_DIR + + for i + do + VTK_SOURCE_DIR="$WM_THIRD_PARTY_DIR/$i" + [ -d "$VTK_SOURCE_DIR" ] && break + done [ -d "$VTK_SOURCE_DIR" ] || { - echo "did not find VTK-$VTK_VERSION in these directories:" - echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" + echo "Did not locate VTK version:" + while [ "$#" -ge 1 ]; do echo " $1"; shift; done + echo + echo "In the directory:" + echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" echo echo "abort build" exit 1 diff --git a/makeParaView b/makeParaView index f0a24af..b559e8f 100755 --- a/makeParaView +++ b/makeParaView @@ -26,9 +26,12 @@ # makeParaView # # Description -# Make and install paraview 4 or 5 -# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION -# (note capitalisation) +# Make and install ParaView 4 or 5. +# The ParaView sources should be located under one of these locations: +# - $WM_THIRD_PARTY_DIR/ParaView-VERSION +# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION +# +# Note the capitalization of ParaView in the directory names. # #------------------------------------------------------------------------------ # Get ParaView_DIR location from OpenFOAM config file diff --git a/makeVTK b/makeVTK index d2b4937..d87b7ce 100755 --- a/makeVTK +++ b/makeVTK @@ -26,16 +26,18 @@ # makeVTK # # Description -# Make and install VTK -# - place the VTK source under $WM_THIRD_PARTY_DIR/VTK-VERSION +# Make and install VTK. +# The VTK sources should be located under one of these locations: +# - $WM_THIRD_PARTY_DIR/ParaView-VERSION +# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION # # To use the VTK source from the ParaView source tree, simply make an # appropriate link first. For example, # -# ln -s ParaView-5.1.0/VTK VTK-7.1.0 +# ln -s ParaView-v5.2.0/VTK VTK-7.1.0 # #------------------------------------------------------------------------------ -# run from third-party directory only +# Run from third-party directory only cd ${0%/*} || exit 1 wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"