#! /bin/sh

set -e


case "$1" in
	configure)
		#
		# Fix directory->link transition for /usr/share/squid3/errors in
		# 3.0.STABLE15-1: all has gone well, remove temporary directory
		#
		if (dpkg --compare-versions "$2" lt '3.0.STABLE15-1' &&
		   [ ! -h "/usr/share/squid3/errors" ] &&
		   [ -d "/usr/share/squid3/errors" ])
		then
			rm -rf /usr/share/squid3/errors
			ln -s /usr/share/squid-langpack /usr/share/squid3/errors
		fi
		;;

	abort-upgrade|abort-remove|abort-deconfigure)
		;;
	*)
		#
		#	Unknown action - do nothing.
		#
		exit 0
		;;
esac

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

#DEBHELPER#

exit 0
