#!/bin/sh

set -e

case "$1" in
    install|upgrade)
	if [ -e /usr/share/doc/bash/completion-contrib ]; then
	    rm -rf /usr/share/doc/bash/completion-contrib
	fi
        # let's remove old bash-completion conffiles
        for f in $(dpkg-query -W -f='${Conffiles}\n' bash-completion | grep bash_completion.d | cut -d\  -f2); do
            dpkg-maintscript-helper rm_conffile $f 1:1.3-1 -- "$@"
        done
    ;;

    abort-upgrade)
    ;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0


