Fix typo in man page
[mmh] / man / mh-chart-gen.sh
1 #! /bin/sh
2 #
3 # Generates mh-chart.man from other .man files that have a
4 # SYNOPSIS section.
5
6 nmhmandir=`dirname $0`
7
8 cat <<'EOF'
9 .\"
10 .\" %nmhwarning%
11 .\"
12 .TH MH-CHART %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
13 .SH NAME
14 mh-chart \- Chart of nmh Commands
15 .SH SYNOPSIS
16 .na
17 EOF
18
19 for i in $nmhmandir/*.man; do
20   if ! echo $i | grep 'mh-chart.man' >/dev/null; then
21     if grep '^\.ad' "$i" >/dev/null; then
22       #### Extract lines from just after .SH SYNOPSIS to just before .ad.
23       #### Filter out the "typical usage:" section in pick.man.
24       awk '/.SH SYNOPSIS/,/^(\.ad|typical usage:)/' "$i" | \
25         grep -Ev '^(\.SH SYNOPSIS|\.na|\.ad|typical usage:)'
26       echo
27     fi
28   fi
29 done
30
31 cat <<'EOF'
32 .ad
33
34 .SH "SEE ALSO"
35 nmh(1)
36 EOF