head	1.3;
access;
symbols
	RELENG_4_11_0_RELEASE:1.1.1.1
	RELENG_4_11:1.1.1.1.0.32
	RELENG_4_11_BP:1.1.1.1
	RELENG_4_10_0_RELEASE:1.1.1.1
	RELENG_4_10:1.1.1.1.0.30
	RELENG_4_10_BP:1.1.1.1
	RELENG_4_9_0_RELEASE:1.1.1.1
	RELENG_4_9:1.1.1.1.0.28
	RELENG_4_9_BP:1.1.1.1
	RELENG_4_8_0_RELEASE:1.1.1.1
	RELENG_4_8:1.1.1.1.0.26
	RELENG_4_8_BP:1.1.1.1
	RELENG_4_7_0_RELEASE:1.1.1.1
	RELENG_4_7:1.1.1.1.0.24
	RELENG_4_7_BP:1.1.1.1
	RELENG_4_6_2_RELEASE:1.1.1.1
	RELENG_4_6_1_RELEASE:1.1.1.1
	RELENG_4_6_0_RELEASE:1.1.1.1
	RELENG_4_6:1.1.1.1.0.22
	RELENG_4_6_BP:1.1.1.1
	RELENG_4_5_0_RELEASE:1.1.1.1
	RELENG_4_5:1.1.1.1.0.20
	RELENG_4_5_BP:1.1.1.1
	RELENG_4_4_0_RELEASE:1.1.1.1
	RELENG_4_4:1.1.1.1.0.18
	RELENG_4_4_BP:1.1.1.1
	RELENG_4_3_0_RELEASE:1.1.1.1
	RELENG_4_3:1.1.1.1.0.16
	RELENG_4_3_BP:1.1.1.1
	RELENG_4_2_0_RELEASE:1.1.1.1
	RELENG_4_1_1_RELEASE:1.1.1.1
	PRE_SMPNG:1.1.1.1
	RELENG_4_1_0_RELEASE:1.1.1.1
	RELENG_3_5_0_RELEASE:1.1.1.1
	RELENG_4_0_0_RELEASE:1.1.1.1
	RELENG_4:1.1.1.1.0.14
	RELENG_4_BP:1.1.1.1
	RELENG_3_4_0_RELEASE:1.1.1.1
	RELENG_3_3_0_RELEASE:1.1.1.1
	RELENG_3_2_PAO:1.1.1.1.0.12
	RELENG_3_2_PAO_BP:1.1.1.1
	RELENG_3_2_0_RELEASE:1.1.1.1
	RELENG_3_1_0_RELEASE:1.1.1.1
	RELENG_3:1.1.1.1.0.10
	RELENG_3_BP:1.1.1.1
	RELENG_2_2_8_RELEASE:1.1.1.1
	RELENG_3_0_0_RELEASE:1.1.1.1
	RELENG_2_2_7_RELEASE:1.1.1.1
	RELENG_2_2_6_RELEASE:1.1.1.1
	RELENG_2_2_5_RELEASE:1.1.1.1
	RELENG_2_2_2_RELEASE:1.1.1.1
	RELENG_2_2_1_RELEASE:1.1.1.1
	RELENG_2_2_0_RELEASE:1.1.1.1
	RELENG_2_1_7_RELEASE:1.1.1.1
	RELENG_2_1_6_1_RELEASE:1.1.1.1
	RELENG_2_1_6_RELEASE:1.1.1.1
	RELENG_2_2:1.1.1.1.0.8
	RELENG_2_2_BP:1.1.1.1
	RELENG_2_1_5_RELEASE:1.1.1.1
	RELENG_2_1_0_RELEASE:1.1.1.1
	RELENG_2_1_0:1.1.1.1.0.6
	RELENG_2_1_0_BP:1.1.1.1
	RELENG_2_0_5_RELEASE:1.1.1.1
	RELENG_2_0_5:1.1.1.1.0.4
	RELENG_2_0_5_BP:1.1.1.1
	RELENG_2_0_5_ALPHA:1.1.1.1
	RELEASE_2_0:1.1.1.1
	BETA_2_0:1.1.1.1
	ALPHA_2_0:1.1.1.1.0.2
	bsd_44_lite:1.1.1.1
	CSRG:1.1.1;
locks; strict;
comment	@# @;


1.3
date	2002.05.29.04.07.49;	author mpp;	state dead;
branches;
next	1.2;

1.2
date	2001.02.06.12.45.29;	author asmodai;	state Exp;
branches;
next	1.1;

1.1
date	94.05.30.19.08.58;	author rgrimes;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	94.05.30.19.08.59;	author rgrimes;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Remove the share/man/tools directory.  Nothing in here works anymore, and
'manck' from ports does just about everything these tools ever did.
(I did have these 90% working about 5 years ago, but manck came along.....)

The only file of interest might be sp.ignore, but it can be pulled
from the attic if anyone has that much interest.

Inspired by: Mark Murray's deletion of share/man/man0
@
text
@#!/bin/sh
#
# $FreeBSD: src/share/man/tools/tocrc,v 1.2 2001/02/06 12:45:29 asmodai Exp $

MANDIR=/usr/share/man
TMPDIR=/usr/share/man/tmp
TOOLS=$MANDIR/tools

trap "rm $TMPDIR/tmp.$$ ; exit" 2 3 15

P=108
p=""
if test "$1" = "-p"
then
	P=65
	p=-p
	shift
fi

if test $# -eq 0
then
	echo "tocrc: no argument"
	exit
fi

if test $# -eq 2
then
	: create toc input file for one section only

	> $TMPDIR/tocx$1
	for file in $MANDIR/man$1/*.$1*
	do
		if test ! -s $file
		then
			continue
		fi
		so=`line < $file | sed "s/ .*//"`
		if test "$so" = ".so"
		then
			continue
		fi
		ed - $file > $TMPDIR/tmp.$$ <<!
			H
			/^\.TH/p
			q
!
		loc=`cat $TMPDIR/tmp.$$ | sed "s/.*local.*/local/"`
		if test "$loc" = "local"
		then
			continue
		fi
		name=`basename $file`
		name=`echo $name | sed "s/\.\(.\{1,2\}\)\$/(\1)/"`
		ed - $file > $TMPDIR/tmp.$$ <<!
			/^.SH NAME/+p
			q
!
		desc=`line < $TMPDIR/tmp.$$`
		desc=`echo $desc | sed -e "s/.s-1//g" -e "s/.s0//g"  -e "s/.s+1//g"   -e "s/ .- /: /"  -e "s/^/$name /"  -e "s/$/./"`
		if test -n "$desc"
		then
			echo $desc >> $TMPDIR/tocx$1
		fi
		rm -f $TMPDIR/tmp.$$
	done
else case $1 in
	all )
		:   tocx files for all sections and everything else

		for x in 1 2 3 4 5 6 7 8
		do
			$0 $p $x $x
		done
		$0 $p t
		;;
	t )
		:   permuted index and toc files

		if test ! -f $TMPDIR/tocx1
		then
			echo "tocrc: some tocx? files missing"
			exit
		fi
		cat $TMPDIR/tocx? > $TMPDIR/cattoc
		ed - $TMPDIR/cattoc <<!
			H
			g/(1c)/s//(1C)/
			g/(1m)/s//(1M)/
			g/(1g)/s//(1G)/
			g/(3c)/s//(3C)/
			g/(3m)/s//(3M)/
			g/(3s)/s//(3S)/
			g/(3x)/s//(3X)/
			g/"\."/d
			w
			q
!
		ptx -r -t -b $TOOLS/break -f -w $P -i $TOOLS/ignore $TMPDIR/cattoc $MANDIR/man0/ptxx
		for x in 1 2 3 4 5 6 7 8
		do
			ed - $TMPDIR/tocx$x << !
			H
				/^intro/m0
				1,\$s/ .*://
				1,\$s/.$//
				1,\$s/([1-8][a-z]\{0,1\}) /" "/
				1,\$s/.*/.xx "&"/
				g/""/d
				w $MANDIR/man0/toc$x
				q
!
		done
		;;
	* )
		$0 $p $1 $1
		;;
	esac
fi
@


1.2
log
@Our manual pages are no longer in /usr/man, but in /usr/share/man.

Also, add the default #!/bin/sh for shellscripts, as well as $FreeBSD$.
@
text
@d3 1
a3 1
# $FreeBSD$
@


1.1
log
@Initial revision
@
text
@d1 6
a6 2
MANDIR=/usr/man
TMPDIR=/usr/man/tmp
@


1.1.1.1
log
@BSD 4.4 Lite Share Sources
@
text
@@
