#!/bin/sh -e

FLAVOR="$1"

echo "install/mmm-mode: Handling removal of emacsen flavor ${FLAVOR}"

echo "install/mmm-mode: purging byte-compiled files for ${FLAVOR}"
rm -rf /usr/share/${FLAVOR}/site-lisp/mmm-mode/*.elc

# xemacs has symlinks for the source files, which need to go
if [ "$FLAVOR" != "emacs" ]; then
    rm -rf /usr/share/${FLAVOR}/site-lisp/mmm-mode/
fi

exit 0;
