blob: 6d08d9f19b96854cc46e57008cd7340ce7617a7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/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
|