void-packages/templates/texinfo/INSTALL

32 lines
617 B
Plaintext

#
# This script registers all currently installed info files.
#
texinfo_files="info.info.gz info-stnd.info.gz texinfo.gz
texinfo-1.gz texinfo-2.gz texinfo-3.gz"
case "$2" in
pre)
;;
post)
for file in $(find ./usr/share/info -type f ! -name dir); do
for i in ${texinfo_files}; do
if [ "$(basename ${file#.})" = "${i}" ]; then
found=1
break
fi
done
if [ -n "$found" ]; then
unset found
continue
fi
echo -n "Registering info file: ${file#.}... "
install-info $file ./usr/share/info/dir 2> /dev/null
if [ $? -eq 0 ]; then
echo "done."
else
echo "failed!"
fi
done
;;
esac