#! /bin/bash
#                               -*- Mode: Sh -*- 
# emacsen.remove --- 
# Author           : Manoj Srivastava ( srivasta@tiamat.datasync.com ) 
# Created On       : Mon Apr 13 01:38:03 1998
# Created On Node  : tiamat.datasync.com
# Last Modified By : Manoj Srivastava
# Last Modified On : Wed Apr 15 23:01:10 1998
# Last Machine Used: tiamat.datasync.com
# Update Count     : 9
# Status           : Unknown, Use with caution!
# HISTORY          : 
# Description      : 
# 
# 


set -e

FLAVOUR=$1
PACKAGE="psgml"
VERSION="1.0.1-17"

if [ "X$FLAVOUR" = "X" ]; then
    echo Need argument to determin FLAVOUR of emacs;
    exit 1
fi

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

if [ "X$VERSION" = "X" ]; then
    echo Internal error: need package version;
    exit 1;
fi


ELDIR=/usr/share/emacs/site-lisp/$PACKAGE
ELCDIR=/usr/share/$FLAVOUR/site-lisp/$PACKAGE/
EFLAGS="-batch -q -l load-path-hack.el -f batch-byte-compile"
INFO_FILES="psgml-api.info psgml.info";

case $FLAVOUR in
    emacs19|emacs20)
        echo -n "remove/$PACKAGE: Removing for $FLAVOUR..."
        rm -f $ELCDIR/*.elc
	if test -x /usr/sbin/install-info-altdir; then
	    for infofile in $INFO_FILES; do
		install-info-altdir --quiet --section "" "" \
		    --dirname=${FLAVOUR} $infofile
	    done
	fi
        echo " done."	
	
	;;
    *)
        echo "remove/$PACKAGE: Ignoring emacsen flavor $FLAVOUR."	
	;;
esac

exit 0

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