From 2b97ead00867e5e8acf08c4add57af74fbaf6145 Mon Sep 17 00:00:00 2001 From: william Date: Wed, 5 Feb 2014 16:20:53 +0000 Subject: [PATCH] BUG: removed bash-dependent test for the existence of gnuplot --- tutorials/combustion/chemFoam/gri/validation/createGraph | 5 +++-- tutorials/combustion/chemFoam/h2/validation/createGraph | 5 +++-- tutorials/combustion/chemFoam/ic8h18/validation/createGraph | 5 +++-- tutorials/combustion/chemFoam/nc7h16/validation/createGraph | 5 +++-- .../buoyantSimpleFoam/buoyantCavity/validation/createGraphs | 5 +++-- .../boundaryFoam/boundaryWallFunctionsProfile/Allrun | 6 ++++-- tutorials/lagrangian/MPPICFoam/cyclone/Allrun | 2 +- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/tutorials/combustion/chemFoam/gri/validation/createGraph b/tutorials/combustion/chemFoam/gri/validation/createGraph index 53078e0719..9e97ecfd50 100755 --- a/tutorials/combustion/chemFoam/gri/validation/createGraph +++ b/tutorials/combustion/chemFoam/gri/validation/createGraph @@ -1,9 +1,10 @@ #!/bin/sh -type -P gnuplot &>/dev/null || { +if ! which gnuplot > /dev/null 2>&1 +then echo "gnuplot not found - skipping graph creation" >&2 exit 1 -} +fi gnuplot</dev/null || { +if ! which gnuplot > /dev/null 2>&1 +then echo "gnuplot not found - skipping graph creation" >&2 exit 1 -} +fi gnuplot</dev/null || { +if ! which gnuplot > /dev/null 2>&1 +then echo "gnuplot not found - skipping graph creation" >&2 exit 1 -} +fi gnuplot</dev/null || { +if ! which gnuplot > /dev/null 2>&1 +then echo "gnuplot not found - skipping graph creation" >&2 exit 1 -} +fi gnuplot</dev/null || { +if ! which gnuplot > /dev/null 2>&1 +then echo "gnuplot not found - skipping graph creation" >&2 exit 1 -} +fi SETSDIR="../postProcessing/sets" diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun index d30f1362fc..9377ab7822 100755 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun @@ -41,10 +41,12 @@ done # create validation plot # test if gnuplot exists on the system -type -P gnuplot &>/dev/null || { +if ! which gnuplot > /dev/null 2>&1 +then echo "gnuplot not found - skipping graph creation" >&2 exit 1 -} +fi + graphName="OF_vs_ANAYTICAL.eps" echo "Creating graph of u+ vs y+ to $graphName" diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/Allrun b/tutorials/lagrangian/MPPICFoam/cyclone/Allrun index 0ee008964e..aafb01639e 100755 --- a/tutorials/lagrangian/MPPICFoam/cyclone/Allrun +++ b/tutorials/lagrangian/MPPICFoam/cyclone/Allrun @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh cd ${0%/*} || exit 1