xref: /netbsd-src/external/ibm-public/postfix/dist/mantools/check-postfix-files (revision 059c16a85b0b39d60ad6d18f53c09510815afa2b)
1#!/bin/sh
2
3# Reports missing documentation file names in postfix-files. For
4# simplicity and maintainability this looks at file basenames only.
5# The odds that a file is installed in the wrong place are small.
6
7trap 'rm -f expected.tmp actual.tmp' 0 1 2 3 15
8
9LANG=C; export LANG
10LC_ALL=C; export LC_ALL
11
12# Extract file basenames from postfix-files.
13
14awk -F: '
15    BEGIN { want["f"] = want["h"] = want["l"] = want["p"] = 1 }
16    want[$2] == 1 { n = split($1, path, "/"); print path[n] }
17' conf/postfix-files | sort >actual.tmp
18
19# Create a list of expected names, excluding files that aren't installed.
20
21(ls man/man?/* html/*.html |sed 's/.*\///' | grep -E -v '^makedefs.1
22^posttls-finger.1
23^qmqp-sink.1
24^qmqp-source.1
25^qshape.1
26^smtp-sink.1
27^smtp-source.1'
28ls README_FILES) | sort >expected.tmp
29
30# Compare the expected names against the names in postfix-files.
31
32comm -23 expected.tmp actual.tmp
33