#! /bin/sh # preinst script for dvi2ps # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' etcdir=/etc/texmf/dvi2ps comp_fontdesc(){ valfp=`dpkg -s dvi2ps | grep fontdesc | awk '{print $2}'` valfi=`md5sum ${etcdir}/fontdesc | awk '{print $1}'` if [ X"${valfp}" = X"${valfi}" ]; then fflag=unmodified else fflag=modified fi } comp_conf(){ valcp=`dpkg -s dvi2ps | grep configk | awk '{print $2}'` valci=`md5sum ${etcdir}/configk | awk '{print $1}'` if [ X"${valcp}" = X"${valci}" ]; then cflag=unmodified else cflag=modified fi } check_fontdesc(){ comp_fontdesc if [ X"${fflag}" = Xmodified ] && [ -f ${etcdir}/fontdesc ] && [ X"`grep 3.2j ${etcdir}/fontdesc`" != X"# 3.2j" ]; then mv -f ${etcdir}/fontdesc ${etcdir}/fontdesc.disable cat > ${etcdir}/fontdesc < ${etcdir}/configk <&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. exit 0