]>
diplodocus.org Git - nmh/blob - man/mh-chart-gen.sh
3 # Generates mh-chart.man from other .man files that have a SYNOPSIS
8 # The following ensures the generated date field in the manpage is divorced
9 # from the local build environment when building distribution packages.
10 LC_TIME
=C
; export LC_TIME
12 datestamp
=`date '+%B %d, %Y'`
15 .TH MH-CHART %manext7% "${datestamp}" "%nmhversion%"
20 mh-chart \- Chart of nmh Commands
25 for i
in $nmhmandir/*.man
; do
28 *) if grep '^\.ad' "$i" >/dev
/null
; then
29 #### Extract lines from just after .SH SYNOPSIS to just before .ad.
30 #### Filter out the "typical usage:" section in pick.man.
31 awk '/.SH SYNOPSIS/,/^(\.ad|typical usage:)/ {
32 if ($0 !~ /^(\.SH SYNOPSIS|\.na|\.ad|typical usage:)/) print