summaryrefslogtreecommitdiff
path: root/misc/tkman/files
diff options
context:
space:
mode:
authorThomas Gellekum <tg@FreeBSD.org>2000-07-12 12:05:58 +0000
committerThomas Gellekum <tg@FreeBSD.org>2000-07-12 12:05:58 +0000
commit4b0ca052d86106dd3c1a4e0adbb45ad2308128ba (patch)
treed2b81171c56cf6a5bd2d515b4bbb5c69e16526a9 /misc/tkman/files
parentIn case someone really hates me ... (diff)
Update the glimpse index once a week.
Submitted by: Oliver Helmling <oliver.helmling@stud.uni-bayreuth.de>
Diffstat (limited to 'misc/tkman/files')
-rw-r--r--misc/tkman/files/310.index_manpages23
1 files changed, 23 insertions, 0 deletions
diff --git a/misc/tkman/files/310.index_manpages b/misc/tkman/files/310.index_manpages
new file mode 100644
index 000000000000..510f98c6b925
--- /dev/null
+++ b/misc/tkman/files/310.index_manpages
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/periodic/weekly/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+IFS=":" mandirs=`/usr/bin/manpath`
+
+for dir in ${mandirs}; do
+ cd ${dir}
+ if [ ! -r .glimpse_filters ] ; then
+ echo '*.gz /usr/bin/gzip -cdfq' > .glimpse_filters
+ fi
+ if [ -x ${PREFIX}/bin/glimpseindex ]; then
+ echo ""
+ echo "Rebuilding man page indexes:"
+ ${PREFIX}/bin/glimpseindex -z -o -B -f -H ${dir} man*
+ chmod 644 ${dir}/.glimpse_*
+ fi
+done
+
+exit 0