#!/bin/sh -e
check_run_without_errors ()
{
tempfile=`mktemp -p /tmp checkrun.XXXXXXXX`
if which $1 >/dev/null; then
echo -n "Running $1. This may take some time. ..."
set +e
$* > $tempfile 2>&1
if [ $? = 0 ] ; then
rm -f $tempfile
echo " done."
else
echo
echo "$* failed. Output has been stored in"
echo "$tempfile"
echo "If tex-common is not configured you can ignore this error message!"
echo "Otherwise please include this file if you report a bug."
echo
fi
set -e
else
rm -f $tempfile
fi
return 0
}
update_lsr_files ()
{
tempfile=`mktemp -p /tmp mktexlsr.XXXXXXXX`
echo -n "Running mktexlsr. This may take some time. ..."
if mktexlsr /usr/share/texmf /var/lib/texmf > $tempfile 2>&1 ; then
rm -f $tempfile
echo " done."
else
echo
echo "mktexlsr failed. Output has been stored in"
echo "$tempfile"
echo "Please include this file if you report a bug."
echo
exit 1
fi
}
case "$1" in
remove|disappear)
rm -f /var/lib/texmf/web2c/texinfo.*
check_run_without_errors update-fmtutil --quiet
check_run_without_errors mktexlsr /usr/share/texmf /var/lib/texmf
;;
purge|upgrade|failed-upgrade|abort-upgrade|abort-install)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0