1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_version 2.0
db_get proofgeneral/autoload || true; autoload=${RET}
if [ "$1" = "configure" ]; then
# remove old scripts
if [ -f /etc/emacs21/site-start.d/50proofgeneral.el ]; then
echo "Removing old proofgeneral startup file for Emacs21"
rm -f /etc/emacs21/site-start.d/50proofgeneral.el
fi
if [ -L /etc/xemacs21/site-start.d/50proofgeneral.el ]; then
echo "Removing old proofgeneral startup file for XEmacs21"
rm -f /etc/xemacs21/site-start.d/50proofgeneral.el
fi
# remove startup script if autoload is disabled
if [ ${autoload} = "true" ] ; then
echo "Installing proofgeneral startup files for Emacs"
cat <<EOF > /etc/emacs/site-start.d/50proofgeneral.el
;; -*-emacs-lisp-*-
;;
;; Emacs startup file for the Debian GNU/Linux proofgeneral package
;;
;; This file is automatically generated by the proofgeneral postinst
;; script. It will automatically be removed or changed on remove or
;; upgrade. If you want to change this file anyway use
;; "dpkg-reconfigure proofgeneral" to disable the autoload behaviour
;; and install your own version of this file.
;;
(defun proofgeneral ()
(interactive)
"Load the ProofGeneral and bind several proof script file extensions to
the respective ProofGeneral major mode."
(load "/usr/share/emacs/site-lisp/proofgeneral/generic/proof-site.el"))
EOF
else
echo "Removing proofgeneral startup files for Emacs"
rm -f /etc/emacs/site-start.d/50proofgeneral.el
fi
fi
#DEBHELPER#
exit 0
|