X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=debian%2Fnotmuch-emacs.emacsen-remove;h=a555320983dcf693f3ed82fdf867c4dcd1c102c0;hp=3b433ae2bebe0eb13277caf0139a43a1ee213cf3;hb=e84a51e5c465c5bd73ef47322e10924da5e3ecea;hpb=beaf251e16d40bb38d56a1ec5573bfdc1c1cfb0d diff --git a/debian/notmuch-emacs.emacsen-remove b/debian/notmuch-emacs.emacsen-remove index 3b433ae2..a5553209 100755 --- a/debian/notmuch-emacs.emacsen-remove +++ b/debian/notmuch-emacs.emacsen-remove @@ -1,8 +1,34 @@ -#!/bin/sh -e -# /usr/lib/emacsen-common/packages/remove/notmuch-emacs +#!/bin/sh +# /usr/lib/emacsen-common/packages/remove/notmuch + +set -e FLAVOR=$1 PACKAGE=notmuch +elc_dir=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +case "${FLAVOR}" in + emacs) + return 0 + ;; + xemacs*|emacs2[12]) + # patches welcome. + echo install/${PACKAGE}: skipping removal for unsupported emacsen flavor ${FLAVOR} + exit 0 + ;; + *) + echo remove/${PACKAGE}: Handling removal for emacsen flavor ${FLAVOR} +esac + +echo remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} + +echo emacsen-common: purging byte-compiled files for ${FLAVOR} +rm -f ${elc_dir}/*.elc +rm -f ${elc_dir}/*.el +rm -f ${elc_dir}/Install.log* +if test -e "${elc_dir}" +then + rmdir --ignore-fail-on-non-empty "${elc_dir}" +fi -echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} -rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +exit 0;