#!/bin/bash

set -e
case "$1" in
	 remove|upgrade)
        find /usr/share/bt-dw1560/firmware -type f -o -type l | while read fw; do
            target=${fw/\/usr\/share\/bt-dw1560//lib}
            ([ -f "$target" ] || [ -L "$target" ]) && rm -v "$target"
            dpkg-divert --package bt-dw1560 --rename --remove $target
        done
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
