debian/postrm: remove /lib/firmware/ if it's empty
[kinect-audio-setup.git] / debian / postrm
1 #!/bin/sh
2 # postrm script for kinect-audio-setup
3 #
4 # see: dh_installdeb(1)
5
6 set -e
7
8 case "$1" in
9     purge)
10         rm -rf /lib/firmware/kinect
11         rmdir --ignore-fail-on-non-empty --parents /lib/firmware/ || true
12
13         if [ -e /usr/share/debconf/confmodule ];
14         then
15             . /usr/share/debconf/confmodule
16             db_purge
17         fi
18     ;;
19
20     remove|upgrade|failed-upgrade|abort-upgrade|abort-install)
21     ;;
22
23     *)
24         echo "postrm called with unknown argument \`$1'" >&2
25         exit 1
26     ;;
27 esac
28
29 # dh_installdeb will replace this with shell code automatically
30 # generated by other debhelper scripts.
31
32 #DEBHELPER#
33
34 exit 0