preinst is in groff-base 1.21-7.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #! /bin/sh -e
case $1 in
install|upgrade)
if dpkg --compare-versions "$2" lt 1.17-2; then
if [ -d /usr/share/groff/site-tmac ]; then
if [ -d /etc/groff ]; then
# Erm. This shouldn't happen.
echo "Moving /usr/share/groff/site-tmac out of the way."
mv -f /usr/share/groff/site-tmac \
/usr/share/groff/site-tmac.old
else
echo "Moving /usr/share/groff/site-tmac to /etc/groff."
mv -f /usr/share/groff/site-tmac /etc/groff
touch /usr/share/groff/site-tmac.moved-by-preinst
fi
fi
if [ -e /etc/tmac.man.local ]; then
echo "Moving /etc/tmac.man.local to /etc/groff/man.local."
mkdir -p /etc/groff
mv -f /etc/tmac.man.local /etc/groff/man.local
touch /etc/tmac.man.local.moved-by-preinst
fi
fi
;;
esac
exit 0
|