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<