#!/bin/sh # $NetBSD: mkindex,v 1.1 2000/09/11 21:08:50 fredb Exp $ # # This is a script to construct the glimpse databases for tkman, # and also the apropos databases shared by tkman, man, and xman. # We don't do this as part of the package install because it could # be very time-consuming. It is possible to simply run tkman as root, # and exercise the menu option to "rebuild databases", but it could # take a long time, and who wants to run an X app as root, anyway? # # You might run this on a weekly basis by adding the following # entry to root's crontab (edited to taste): # # 10 2 * * 6 @@PREFIX@@/libexec/mkindex # Don't add /usr/local to the list unless there's something there, # because an empty glimpse database will cause tkman to squawk. for i in /usr/share @@LOCALBASE@@ @@X11BASE@@; do echo "Rebuilding glimpse database in $i/man..." @@LOCALBASE@@/bin/glimpseindex -o -B -z -H $i/man $i/man/man? chmod a+r $i/man/.glimpse_* echo echo "Rebuilding apropos database in $i/man..." /usr/libexec/makewhatis $i/man echo done