#!/bin/sh -e

FLAVOR=$1
elc_dir=/usr/share/${FLAVOR}/site-lisp/doxymacs

echo remove/doxymacs: Handling removal of emacsen flavor ${FLAVOR}

if [ ${FLAVOR} != emacs ]
then
  echo emacsen-common: purging byte-compiled files for ${FLAVOR}
  rm -f ${elc_dir}/*.elc
  [ -d ${elc_dir} -a `ls -la ${elc_dir}|wc -l` -gt 3 ] && rmdir ${elc_dir}
fi
exit 0;
