Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Compile latest emacs version in Ubuntu Precise, Trusty ...
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Tested on Ubuntu 12.04 LTS onward.
# version: 25.1
# Toolkit: lucid
set -e
readonly version="25.1"
# install dependencies
sudo apt-get install -y stow
sudo apt-get build-dep emacs24
# Change to emacs23, emacs25 or any version available on your current Ubuntu.
# download source package
if [[ ! -d emacs-"$version" ]]; then
wget http://ftp.gnu.org/gnu/emacs/emacs-"$version".tar.xz
tar xvf emacs-"$version".tar.xz
fi
# buil and install
cd emacs-"$version"
./configure \
--with-xft \
--with-x-toolkit=lucid
make -j4
sudo make install prefix=/usr/local/stow/emacs-"$version"
cd /usr/local/stow
sudo stow emacs-"$version"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.