1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00
freebsd-ports/misc/tkman/files/310.index_manpages
Thomas Gellekum 4b0ca052d8 Update the glimpse index once a week.
Submitted by:	Oliver Helmling <oliver.helmling@stud.uni-bayreuth.de>
2000-07-12 12:05:58 +00:00

24 lines
513 B
Bash

#!/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