mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
27 lines
756 B
Bash
Executable File
27 lines
756 B
Bash
Executable File
#!/bin/sh
|
|
# This shell script runs the ncdump tests.
|
|
# $Id: run_nc4_tests.sh,v 1.4 2010/05/18 20:05:23 dmh Exp $
|
|
srcdir=`dirname $0`
|
|
cd $srcdir
|
|
srcdir=`pwd`
|
|
|
|
# compute the build directory
|
|
builddir=`pwd`/..
|
|
# Hack for CYGWIN
|
|
cd $srcdir
|
|
if [ `uname | cut -d "_" -f 1` = "MINGW32" ]; then
|
|
srcdir=`pwd | sed 's/\/c\//c:\//g'`
|
|
builddir="$srcdir"/..
|
|
fi
|
|
echo "*** Testing ncgen for netCDF-4."
|
|
set -e
|
|
echo "*** creating netCDF-4 file c0_4.nc from c0.cdl..."
|
|
./ncgen -k3 -b -o c0_4.nc $srcdir/c0.cdl
|
|
echo "*** creating netCDF-4 classic model file c0_4c.nc from c0.cdl..."
|
|
./ncgen -k4 -b -o c0_4c.nc $srcdir/c0.cdl
|
|
echo "*** creating C code for CAM file ref_camrun.cdl..."
|
|
./ncgen -lc $srcdir/ref_camrun.cdl >ref_camrun.c
|
|
|
|
echo "*** Test successful!"
|
|
exit 0
|