xref: /netbsd-src/external/ibm-public/postfix/dist/mantools/check-postfix-files (revision 059c16a85b0b39d60ad6d18f53c09510815afa2b)
14a672054Schristos#!/bin/sh
24a672054Schristos
34a672054Schristos# Reports missing documentation file names in postfix-files. For
44a672054Schristos# simplicity and maintainability this looks at file basenames only.
54a672054Schristos# The odds that a file is installed in the wrong place are small.
64a672054Schristos
74a672054Schristostrap 'rm -f expected.tmp actual.tmp' 0 1 2 3 15
84a672054Schristos
94a672054SchristosLANG=C; export LANG
104a672054SchristosLC_ALL=C; export LC_ALL
114a672054Schristos
124a672054Schristos# Extract file basenames from postfix-files.
134a672054Schristos
144a672054Schristosawk -F: '
154a672054Schristos    BEGIN { want["f"] = want["h"] = want["l"] = want["p"] = 1 }
164a672054Schristos    want[$2] == 1 { n = split($1, path, "/"); print path[n] }
174a672054Schristos' conf/postfix-files | sort >actual.tmp
184a672054Schristos
194a672054Schristos# Create a list of expected names, excluding files that aren't installed.
204a672054Schristos
21*059c16a8Schristos(ls man/man?/* html/*.html |sed 's/.*\///' | grep -E -v '^makedefs.1
224a672054Schristos^posttls-finger.1
234a672054Schristos^qmqp-sink.1
244a672054Schristos^qmqp-source.1
254a672054Schristos^qshape.1
264a672054Schristos^smtp-sink.1
274a672054Schristos^smtp-source.1'
284a672054Schristosls README_FILES) | sort >expected.tmp
294a672054Schristos
304a672054Schristos# Compare the expected names against the names in postfix-files.
314a672054Schristos
324a672054Schristoscomm -23 expected.tmp actual.tmp
33