#!/bin/sh
#
# emacsen-remove for python-elisp, Gregor Hoffleit <aph@debian.org>
#
# parts borrowed from gnus's emacsen-install,
#  by Manoj Srivastava <srivasta@tiamat.datasync.com>
#
# This file is free software under the terms of the GNU
# Public License, version 2 or higher.

set -e

FLAVOR=$1
PACKAGE="python-elisp"

if [ "X$FLAVOR" = "X" ]; then
    echo need argument to determine FLAVOR of emacs
    exit 1
fi

if [ "X$PACKAGE" = "X" ]; then
    echo internal error: need package name
    exit 1
fi

ELDIR=/usr/share/emacs/site-lisp/$PACKAGE
ELCDIR=/usr/share/$FLAVOUR/site-lisp/$PACKAGE

case "$FLAVOR" in
    xemacs19 | emacs20 | xemacs20 | xemacs21)
	echo -n "remove/$PACKAGE: removing for $FLAVOR..."
	if [ -d $ELCDIR ]; then
	    rm -rf $ELCDIR
	fi
	echo "done."
	;;
    *)
	echo "remove/$PACKAGE: ignoring emacsen flavor $FLAVOR."
	;;
esac

exit 0
