#!/bin/sh set -e # Manual dir_to_symlink conversion since dpkg-maintscript-helper does not # handle this in combination with arch:all to arch:any switches (#813455). # Keep this code for buster and bullseye to ease backports. if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "1:26.1+1-3.1~" then test -n 'emacs-lucid' if [ -d /usr/share/doc/emacs-lucid ] && [ ! -h /usr/share/doc/emacs-lucid ] then # This will intentionally fail if the directory is not empty. rmdir /usr/share/doc/emacs-lucid ln -sv emacs-common /usr/share/doc/emacs-lucid fi fi update-alternatives \ --install /usr/bin/emacs emacs \ /usr/bin/emacs-lucid 28 \ --slave /usr/share/man/man1/emacs.1.gz emacs.1.gz \ /usr/share/man/man1/emacs.emacs.1.gz \ update-alternatives \ --install /usr/bin/editor editor \ /usr/bin/emacs 0 \ --slave /usr/share/man/man1/editor.1.gz editor.1.gz \ /usr/share/man/man1/emacs.emacs.1.gz for alt in emacsclient do update-alternatives \ --install "/usr/bin/$alt" "$alt" "/usr/bin/$alt.emacs" 28 \ --slave "/usr/share/man/man1/$alt.1.gz" "$alt.1.gz" \ "/usr/share/man/man1/$alt.emacs.1.gz" done # emacsen-common registration. /usr/lib/emacsen-common/emacs-install emacs