r1: [svn-inject] Installing original source of squirrelmail-cn
[squirrelmail-cn.git] / debian / preinst
1 #!/bin/sh
2
3 set -e
4
5 case "$1" in
6         install|upgrade)
7         ;;
8
9         abort-upgrade)
10         exit 0
11         ;;
12
13         *)
14         echo "preinst called with unknown argument '$1'" >&2
15         exit 1
16         ;;
17 esac
18
19 # leftover from 1.2.6-2
20 if dpkg-divert --list | \
21         egrep -q 'diversion of .*functions/display_messages.php .* by squirrelmail-cn'; then
22
23         rm -f /usr/share/squirrelmail/functions/display_messages.php
24
25         dpkg-divert --package squirrelmail-cn --remove --rename --divert \
26                 /usr/share/squirrelmail/functions/display_messages.php.divert-cn \
27                 /usr/share/squirrelmail/functions/display_messages.php
28 fi
29
30 exit 0