#! /bin/sh -
#
# /etc/cron.daily/texinfo - Update index for Info documents periodically.
#

set -e
ionice -c 3 -p $$
umask 022

for infodir in /usr/local/share/info/ /usr/share/info/
do
    if ! test -d "$infodir"
    then
        echo "WARNING: ${0}: '$infodir' is not a directory." 1>&2
        continue;
    fi

    find -L $infodir -maxdepth 1 ! -name dir \
     -exec install-info '{}' ${infodir}/dir \;
done

