#!/bin/sh set -e # #950111: upgrading from < 1.11.1+dfsg-2 up to and including # 1.11.1+dfsg-6 leaves files in /usr/share/doc/libvigraimpex-doc/html. # Later versions (>= -7) handle the upgrade from << -3 correctly with maintscript-helper. if [ "$1" = "upgrade" ] && test -h /usr/share/doc/libvigraimpex-dev/html && test -d /usr/share/doc/libvigraimpex-doc/html && [ "$(readlink -f /usr/share/doc/libvigraimpex-dev/html)" = "/usr/share/doc/libvigraimpex-doc/html" ] && dpkg --compare-versions "$2" "ge" "1.11.1+dfsg-3" && dpkg --compare-versions "$2" "lt" "1.11.1+dfsg-7~" ; then echo "Hotfixing transition of /usr/share/doc/libvigraimpex-doc/html from symlink to directory" 1>&2 rm -v /usr/share/doc/libvigraimpex-dev/html mv -v /usr/share/doc/libvigraimpex-doc/html \ /usr/share/doc/libvigraimpex-dev/html fi #DEBHELPER#