#!/bin/sh -e
# /usr/lib/emacsen-common/packages/remove/emms

FLAVOR=$1
PACKAGE=emms

ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}

echo "remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}"
if [ ${ELDIR} != ${ELCDIR} ]; then
    rm -rf $ELCDIR
# Handle 'emacs' flavor where .elc will be in the same directory as .el
else
    cd $ELCDIR
    rm -f *.elc install.log install.log.gz
fi
