#!/bin/bash

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

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

#DEBHELPER#

exit 0
