From f3ef77b946ff1f4635e47daf42c0e18157af7c3a Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 13 Jul 2016 09:36:06 +0200 Subject: [PATCH] ENH: remove reliance on ParaView_VERSION env variable - as per the other build scripts, use the OpenFOAM config files for the base settings and command-line arguments for refinement. Note that the $ParaView_DIR (the installation path) contains the paraview version information. So there is no need to keep a second variable just for that purpose. --- makeParaView | 12 ++++++++++++ makeParaView3 | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/makeParaView b/makeParaView index 951ee99..a9f61b3 100755 --- a/makeParaView +++ b/makeParaView @@ -30,6 +30,15 @@ # - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION # (note capitalisation) # +#------------------------------------------------------------------------------ +# Get ParaView_DIR location from OpenFOAM config file +. $WM_PROJECT_DIR/etc/config.sh/functions +_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview) + +# Determine ParaView_VERSION from ParaView_DIR location: +ParaView_VERSION="${ParaView_DIR##*/}"; export ParaView_VERSION +: ${ParaView_VERSION##*-} + #------------------------------------------------------------------------------ # Run from third-party directory only cd ${0%/*} || exit 1 @@ -82,6 +91,7 @@ withGL2=auto Script=${0##*/} usage() { + : ${ParaView_VERSION:=none} # some dummy value for usage information exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<