#!/bin/bash -e
#
# prerm configuration file for Debian witalian package.
# $Id: prerm,v 1.7 1998/04/09 16:53:03 salve Exp $
#
# Copyright  Davide G. M. Salvetti <salve@debian.org>, 1997, 1998.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to: The Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# On Debian GNU/Linux System you can find a copy of the GNU General Public
# License in /usr/doc/copyright/GPL.

set -o posix

LANGUAGE=italian
dict=/etc/dictionary
words=/usr/dict/words

case "$1" in
    upgrade|remove|deconfigure)
	# Remove $words to let dpkg clean up /usr/dict if we are the last dictionary.
	# The postrm will take care of creating it again without asking the user,
	# in case /usr/dict is still there.
	if [ "$words" == \
		"$(find $words -lname "$dict" 2>/dev/null)" ]; then
	    rm -f $words
	fi
    ;;
    failed-upgrade)
	:
    ;;
    *)
	echo "${0##*/}: Called with unknown argument \`$1'." >&2
    ;;
esac

exit 0

### Local Variables:
### mode: shell-script
### End:
