ensure alternatives’ parent directories exist
[alioth/soundfonts.git] / debian / musescore-general-soundfont-lossless.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" $package $new_version
10 # * deconfigureds-prerm "deconfigure" "in-favour"
11 #       $package_being_installed $pbi_version ["removing"
12 #       $conflicting_package $cp_version]
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         update-alternatives --remove MuseScore_General.sf3 \
24             /usr/share/sounds/sf2/MuseScore_General_Full.sf2
25         rmdir --ignore-fail-on-non-empty /usr/share/sounds/sf3
26         ;;
27
28 upgrade|failed-upgrade)
29         ;;
30
31 *)
32         echo >&2 "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