83d2026765fa0f103a62ab42e05f04c44cd1ef50
[alioth/musescore.git] / debian / musescore-common.prerm
1 #!/bin/sh
2
3 set -e
4
5 # This maintainer script can be called the following ways:
6 #
7 # * prerm "remove"
8 # * old-prerm "upgrade" $new_version
9 # * conflictors-prerm "remove" "in-favour" $new_package $new_version
10 # * deconfigureds-prerm "deconfigure" "in-favour"
11 #       $package_being_installed $pbi_version           # new-package
12 #       ["removing" $conflicting_package $cp_version]   # old-package
13 # The package and dependencies are at least Half-Installed; dependencies
14 # have previously been configured and not removed.
15 #
16 # * new-prerm "failed-upgrade" $old_version
17 # * new-prerm "failed-upgrade" $old_version $new_version # 1.18.5, stretch
18 # Called when 'old-prerm "upgrade"' fails; new package not unpacked, all
19 # other constraints the same as above.
20
21 case $1 in
22 (remove|deconfigure)
23         # remove directories if they were created in postinst
24         rmdir --ignore-fail-on-non-empty \
25             /usr/share/sounds/sf2 /usr/share/sounds/sf3 /usr/share/sounds/sfz
26         ;;
27
28 (upgrade|failed-upgrade)
29         ;;
30
31 (*)
32         echo >&2 "E: prerm called with unknown subcommand '$1'"
33         exit 1
34         ;;
35 esac
36
37 # dh_installdeb will replace this with shell code automatically
38 # generated by other debhelper scripts.
39
40 #DEBHELPER#
41
42 exit 0