#!/bin/bash -e
#
# elisp remove file for Debian auctex package.
# $Id: remove.in,v 1.5 1999/10/22 19:58:34 salve Exp $
#
# Copyright  Davide G. M. Salvetti <salve@debian.org>, 1997, 1998, 1999.
#
# 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/share/common-licenses/GPL".

set -o posix

FLAVOR=$1

case "$FLAVOR" in 
    emacs)
	:
    ;;
    emacs19|emacs20|mule2)
	echo -n "remove/auctex: Removing for $FLAVOR... "
	rm -f /usr/share/$FLAVOR/site-lisp/auctex//{*.elc,CompilationLog.gz}
	rm -f /usr/share/$FLAVOR/site-lisp/auctex//style//*.elc
	rmdir --ignore-fail-on-non-empty /usr/share/$FLAVOR/site-lisp/auctex//style/
	rmdir --ignore-fail-on-non-empty /usr/share/$FLAVOR/site-lisp/auctex/
	echo "done."
    ;;
    *)
	echo "remove/auctex: Ignoring emacsen flavor $FLAVOR."
    ;;
esac

exit 0
