-if [ $# -eq 2 -a $1 = "3" ]
-then
- : create toc input files for section 3 only
-
- ( cd man3 ; for x in 3 3f 3m 3n 3s 3x 3c
- do
- /usr/lib/getNAME -t *.$x |
- sed \
- -e 's/.s-2//g' \
- -e 's/.s-1//g' \
- -e 's/.s0//g' \
- -e 's/.s+1//g' \
- -e 's/ *.- */: /' \
- -e 's/ *$/./' \
- -e 's/.TH.* //' \
- > ../man0/tocx$x
- done
- )
-elif [ $# -eq 2 ]
-then
- : create toc input file for one section only
-
- ( cd man$1 ; /usr/lib/getNAME -t *.* |
- sed \
- -e 's/.s-2//g' \
- -e 's/.s-1//g' \
- -e 's/.s0//g' \
- -e 's/.s+1//g' \
- -e 's/ *.- */: /' \
- -e 's/ *$/./' \
- -e 's/.TH.* //' \
- > ../man0/tocx$1
- )
-else case $1 in
- all )
- : tocx files for all sections and everything else