#!/bin/sh -e

case "$1" in
    install|upgrade)
	# drop old editorrc (master alternative and symlink file both)
	if test -z "$2" || \
	    dpkg --compare-versions "$2" lt '3.7-2.3~'; then
		# this will noisily pass if editorrc was already removed,
		# but not remove a slave alternative
		(update-alternatives --remove-all editorrc 2>/dev/null || :)
	fi
    ;;

    abort-upgrade)
    ;;

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

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

#DEBHELPER#

exit 0
