-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathcheck_install.in
91 lines (80 loc) · 2.06 KB
/
check_install.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#! /bin/sh
#
# Copyright (C) 2016, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
# $Id$
#
# @configure_input@
prefix="@prefix@"
if test $# -eq 1 ; then
prefix=$1
elif test $# -eq 0 ; then
if test "x$prefix" = "x" ; then
echo "This utility checks the PnetCDF install files" >& 2
echo "Usage: $0 install_path" >&2
exit 1
fi
fi
installdir=$prefix
nerrs=0
headerfiles="pnetcdf pnetcdf.h pnetcdf.inc pnetcdf.mod"
for f in $headerfiles
do
installfile=$installdir/include/$f
if ! test -e $installfile ; then
echo "Error: file NOT found: $installfile" >& 2
nerrs=`expr $nerrs + 1`
fi
done
libfiles="libpnetcdf.a"
for f in $libfiles
do
installfile=$installdir/lib/$f
if ! test -e $installfile ; then
echo "Error: file NOT found: $installfile" >& 2
nerrs=`expr $nerrs + 1`
fi
done
pkgfiles="libpnetcdf.pc"
for f in $pkgfiles
do
installfile=$installdir/lib/pkgconfig/$f
if ! test -e $installfile ; then
echo "Error: file NOT found: $installfile" >& 2
nerrs=`expr $nerrs + 1`
fi
done
binfiles="ncmpidiff ncmpidump ncmpigen ncvalidator ncoffsets pnetcdf-config pnetcdf_version"
for f in $binfiles
do
installfile=$installdir/bin/$f
if ! test -e $installfile ; then
echo "Error: file NOT found: $installfile" >& 2
nerrs=`expr $nerrs + 1`
fi
done
man1files="ncmpidiff.1 ncmpigen.1 ncoffsets.1 ncmpidump.1 ncvalidator.1 pnetcdf_version.1"
for f in $man1files
do
installfile=$installdir/share/man/man1/$f
if ! test -e $installfile ; then
echo "Error: file NOT found: $installfile" >& 2
nerrs=`expr $nerrs + 1`
fi
done
man3files="pnetcdf.3 pnetcdf_f77.3 pnetcdf_f90.3"
for f in $man3files
do
installfile=$installdir/share/man/man3/$f
if ! test -e $installfile ; then
echo "Error: file NOT found: $installfile" >& 2
nerrs=`expr $nerrs + 1`
fi
done
if test $nerrs = 0 ; then
echo "PASS -- all PnetCDF files appear in $installdir"
else
echo "FAIL -- $nerrs error(s) found" >& 2
exit 1
fi