Update maintainer scripts for current filenames.
[debian_comixcursors.git] / debian / templates / prerm.template
blob3ada1c105dda39c1adbc110c27f1fe61a0691050
1 #! /bin/sh
2 # Pre-remove script for ‘@PACKAGE@’.
4 # Manpage: ‘dh_installdeb(1)’
6 set -e
8 # Summary of ways this script can be called:
9 # * <prerm> remove
10 # * <old-prerm> upgrade <new-version>
11 # * <new-prerm> failed-upgrade <old-version>
12 # * <conflictor's-prerm> remove
13 # in-favour <package> <new-version>
14 # * <deconfigured's-prerm> deconfigure
15 # in-favour <package-being-installed> <version>
16 # removing <conflicting-package> <version>
17 # For details, see the Debian Policy §6.5 in the ‘debian-policy’ package
18 # or on the web at <URL:http://www.debian.org/doc/debian-policy/>.
20 action="$1"
22 ICONDIR=/usr/share/icons
23 ALTERNATIVE_NAME=x-cursor-theme
25 case "$action" in
26 remove|deconfigure)
27 for theme in `find "$ICONDIR" -regex '.*@THEMESET_PREFIX@.*/index\.theme$'`; do
28 update-alternatives --remove $ALTERNATIVE_NAME "$theme"
29 done
32 upgrade)
33 # We work around Bug#392657 by *not* removing and
34 # re-installing on upgrade. Instead, we remove themes no
35 # longer shipped in preinst, and add new themes on upgrade.
38 failed-upgrade)
42 printf "prerm called with unknown action ‘%s’\n" "$action" >&2
43 exit 1
46 esac
48 # ‘dh_installdeb’ will replace this with shell code automatically generated
49 # by other debhelper scripts.
51 #DEBHELPER#
53 exit 0