summaryrefslogtreecommitdiff
path: root/misc
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
parentIn case someone really hates me ... (diff)
Update the glimpse index once a week.
Submitted by: Oliver Helmling <oliver.helmling@stud.uni-bayreuth.de>
Notes
Notes: svn path=/head/; revision=30511
Diffstat (limited to 'misc')
-rw-r--r--misc/tkman/Makefile2
-rw-r--r--misc/tkman/files/310.index_manpages23
-rw-r--r--misc/tkman/pkg-plist3
3 files changed, 28 insertions, 0 deletions
diff --git a/misc/tkman/Makefile b/misc/tkman/Makefile
index c546fdafc3f8..df50f1ca092c 100644
--- a/misc/tkman/Makefile
+++ b/misc/tkman/Makefile
@@ -26,5 +26,7 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/tkman-help.html ${PREFIX}/share/doc/tkman
.endif
${INSTALL_SCRIPT} ${WRKSRC}/contrib/tkmanclient ${PREFIX}/bin
+ @${MKDIR} ${PREFIX}/etc/periodic/weekly
+ ${INSTALL_SCRIPT} ${FILESDIR}/310.index_manpages ${PREFIX}/etc/periodic/weekly
.include <bsd.port.mk>
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
diff --git a/misc/tkman/pkg-plist b/misc/tkman/pkg-plist
index 3b06c5b0f586..b3a857436061 100644
--- a/misc/tkman/pkg-plist
+++ b/misc/tkman/pkg-plist
@@ -1,5 +1,8 @@
bin/tkman
bin/tkmanclient
bin/retkman
+etc/periodic/weekly/310.index_manpages
share/doc/tkman/tkman-help.html
@dirrm share/doc/tkman
+@dirrm etc/periodic/weekly
+@dirrm etc/periodic