330.catman revision 53619
1#!/bin/sh -
2#
3# $FreeBSD: head/etc/periodic/weekly/330.catman 53619 1999-11-23 03:21:19Z ache $
4#
5
6exit 0		# do not run by default
7
8if [    -x /usr/libexec/catman.local \
9     -a -d /usr/share/man/cat1 \
10     -a -x /usr/bin/manpath ]; then
11    echo ""
12    echo "Reformatting manual pages:"
13
14    MANPATH=`/usr/bin/manpath -q`
15    if [ $? = 0 ]; then
16       if [ "x${MANPATH}" = "x" ]; then
17          echo "manpath failed to find any manpath directories" 
18       else
19	  man_locales=`/usr/bin/manpath -qL`
20         
21          # Preformat original, non-localized manpages  
22          echo /usr/libexec/catman.local "${MANPATH}" | su -fm man
23
24          # Preformat localized manpages.
25	  if [ X"${man_locales}" != X ]; then
26             for i in ${man_locales}
27             do
28                 LC_CTYPE=$i echo /usr/libexec/catman.local -L "${MANPATH}" | \
29                   su -fm man
30             done
31          fi
32       fi
33    fi
34fi
35