2 #------------------------------------------------------------------------------
4 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
6 # \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
8 #-------------------------------------------------------------------------------
10 # This file is part of OpenFOAM.
12 # OpenFOAM is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
17 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
18 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 # You should have received a copy of the GNU General Public License
23 # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 # ensightFoamReaderTest
29 # start ensightFoamReader-udr_checker
31 #------------------------------------------------------------------------------
33 while [ "$#" -ge 1 ]; do echo "$1"; shift; done
36 usage: ${0##*/} [OPTION]
38 -case dir specify alternative case directory
40 * start ensightFoamReader-udr_checker
54 [ "$#" -ge 2 ] || usage
"'$1' option requires an argument"
55 cd "$2" 2>/dev
/null || usage
"directory does not exist: '$2'"
59 usage
"unknown option/argument: '$*'"
65 # check existence of essential files
66 for check
in system
/controlDict system
/fvSchemes system
/fvSolution
68 [ -s "$check" ] || usage
"file does not exist: '$check'"
72 # export values that might be needed
74 export FOAM_CASENAME
=${PWD##*/}
78 playFile
=/tmp
/ensightFoamReader.$$
79 trap "rm -f $playFile 2>/dev/null; exit 0" EXIT TERM INT
81 cat << PLAY_FILE > $playFile
87 echo "ensightFoamReader-udr_checker -p $playFile"
89 ensightFoamReader-udr_checker
-p $playFile
91 #------------------------------------------------------------------------------