File: check-postfix-files

package info (click to toggle)
postfix 3.10.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 27,976 kB
  • sloc: ansic: 134,721; makefile: 17,984; sh: 6,971; perl: 2,796; python: 1,448; awk: 158
file content (32 lines) | stat: -rwxr-xr-x 896 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

# Reports missing documentation file names in postfix-files. For
# simplicity and maintainability this looks at file basenames only.
# The odds that a file is installed in the wrong place are small.

trap 'rm -f expected.tmp actual.tmp' 0 1 2 3 15

LANG=C; export LANG
LC_ALL=C; export LC_ALL

# Extract file basenames from postfix-files.

awk -F: '
    BEGIN { want["f"] = want["h"] = want["l"] = want["p"] = 1 }
    want[$2] == 1 { n = split($1, path, "/"); print path[n] }
' conf/postfix-files | sort >actual.tmp

# Create a list of expected names, excluding files that aren't installed.

(ls man/man?/* html/*.html |sed 's/.*\///' | grep -E -v '^makedefs.1
^posttls-finger.1
^qmqp-sink.1
^qmqp-source.1
^qshape.1
^smtp-sink.1
^smtp-source.1'
ls README_FILES) | sort >expected.tmp 

# Compare the expected names against the names in postfix-files.

comm -23 expected.tmp actual.tmp