summaryrefslogtreecommitdiffstats
path: root/share/man/tools/prsynops
blob: a0cfffe23a0dd6e87a0f7a02ca96be30ebd5e9d2 (plain)
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
#! /bin/sh
set x $*
. ./.param

for dir in $DIRLST
do
	date > $TMPDIR/synops$dir
	echo >> $TMPDIR/synops$dir
	cd $MANDIR/man$dir
	for file in $FILLST
	do
		so=`line < $file | sed "s/ .*//"`
		if test "$so" = ".so"
		then
			continue
		fi
		nroff -man $file > $TMPDIR/tmp.$$
		echo "$file:" >> $TMPDIR/synops$dir
		ed - $TMPDIR/tmp.$$ >> $TMPDIR/synops$dir <<!
			/SYNOPSIS/;+,/^     [A-Z][A-Z][A-Z][A-Z]/-p
			q
!
	done
done

rm -f $TMPDIR/tmp.$$
OpenPOWER on IntegriCloud