#!/bin/sh # preinst script for wims-modules # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in install|upgrade) # removes symlinks which have been installed in former versions # to begin with an experimental German localisation, which will # no more be maintained with the same method. See the obsoleted # patch file debian/patches/20po.patch if [ "no$2" != "no" ]; then oldVersion=$2 if dpkg --compare-versions $oldVersion "<=" 3.65+svn20090927-1; then for f in $(find /var/lib/wims/public_html/modules/ -name "*.de"); do if [ -L $f ]; then rm $f; fi done fi fi # remove old mathjax dir which have been installed in former versions # and is now replaced by Debian's package node-mathjax-full if [ "no$2" != "no" ]; then oldVersion=$2 if dpkg --compare-versions $oldVersion "<=" 2:4.27a~dfsg1-1; then d="/var/lib/wims/public_html/scripts/js/mathjax" if [ -d $d ]; then rm -rf $d; fi fi fi ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. exit 0