#!/bin/sh

set -e

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

#DEBHELPER#

# On upgrade, after rm_conffiles, remove emtpy directories
# See #665797
if [ "$1" = "configure" ]; then
    if dpkg --compare-versions "$2" lt-nl "1.0.0-3~"; then
        if [ -d /etc/bash_completion.d ]; then
            rmdir --ignore-fail-on-non-empty /etc/bash_completion.d
        fi
    fi
fi

exit 0
