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

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

echo remove/autoconf: 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;
