#!/bin/bash # # Restore custom-compiled emacs if test ! -d ./lisp/emacs-lisp; then echo "You are not in the right directory." exit 1 fi if test "$UID" != "0"; then echo "You must be root to run this." exit 1 fi echo "Stage 1: Installing emacs ..." make install echo "Stage 2: Install fake emacs-snapshot package ..." dpkg -i ../../emacs-snapshot_1.0_i386.deb echo "Done." echo "Stage 2: Making symlinks ..." latest=$(cd /usr/local/share/emacs && echo 23.* | tr ' ' '\n' | sort \ | tail -n 1) ln -sf /usr/local/share/emacs/$latest /usr/share/emacs-snapshot ln -sf /usr/local/bin/emacs /usr/bin/emacs-snapshot mkdir -p /etc/emacs-snapshot/site-start.d echo "Done." echo "Stage 3: Installing emacs-snapshot flavor ..." echo >> /var/lib/emacsen-common/installed-flavors echo emacs-snapshot >> /var/lib/emacsen-common/installed-flavors /usr/lib/emacsen-common/emacs-install emacs-snapshot echo "Done."