# arg 1: the new package version post_install() { ver=`echo $1|sed 's/^\(.*\)-.*$/\1/'` install-catalog --add /etc/sgml/OpenSP-$ver.cat \ /usr/share/sgml/OpenSP-$ver/catalog install-catalog --add /etc/sgml/sgml-docbook.cat \ /etc/sgml/OpenSP-$ver.cat } # arg 1: the new package version # arg 2: the old package version post_upgrade() { post_install $1 } # arg 1: the old package version pre_remove() { ver=`echo $1|sed 's/^\(.*\)-.*$/\1/'` install-catalog --remove /etc/sgml/OpenSP-$ver.cat \ /usr/share/sgml/OpenSP-$ver/catalog install-catalog --remove /etc/sgml/sgml-docbook.cat \ /etc/sgml/OpenSP-$ver.cat } # arg 1: the old package version post_remove() { /bin/true } op=$1 shift $op $*