diff options
Diffstat (limited to 'debian/git-el.emacsen-remove')
-rwxr-xr-x | debian/git-el.emacsen-remove | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/debian/git-el.emacsen-remove b/debian/git-el.emacsen-remove new file mode 100755 index 0000000..81408b0 --- /dev/null +++ b/debian/git-el.emacsen-remove @@ -0,0 +1,15 @@ +#!/bin/sh +# Clean up after git.emacsen-install. That is: +# 1. Remove compiled .elc bytecode from the site-lisp directory. +# 2. Remove .el symlinks from the site-lisp directory. +set -e +FLAVOR=$1 +el_files="git.el git-blame.el" +elc_files="git.elc git-blame.elc" +elc_dir=/usr/share/$FLAVOR/site-lisp/git + +printf 'remove/git: Handling removal of emacsen flavor %s\n' "$FLAVOR" +[ -d "$elc_dir" ] || exit 0 +(cd "$elc_dir"; rm -f $elc_files $el_files) +# Simulate --ignore-fail-on-non-empty (which is a GNU extension). +rmdir "$elc_dir" 2>/dev/null || true |