330.catman revision 51173
1#!/bin/sh - 2# 3# $FreeBSD: head/etc/periodic/weekly/330.catman 51173 1999-09-11 18:55:02Z 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 # If possible, check global system configuration file 20 # for additional man(1) locales installed 21 if [ -r /etc/defaults/rc.conf ]; then 22 . /etc/defaults/rc.conf 23 elif [ -r /etc/rc.conf ]; then 24 . /etc/rc.conf 25 fi 26 27 # Preformat original, non-localized manpages 28 echo /usr/libexec/catman.local "${MANPATH}" | su -fm man 29 30 # Preformat localized manpages. 31 if [ "x${man_locales}" != "x" -a "${man_locales}" != "NO" ]; then 32 for i in ${man_locales} 33 do 34 LC_CTYPE=$i echo /usr/libexec/catman.local -L "${MANPATH}" | \ 35 su -fm man 36 done 37 fi 38 fi 39 fi 40fi 41