After having quite a few problems when I did my bi-daily, i.e. every other day, build of emacs, I've reworked my script which makes it easier to use.

Source code

 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
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
set -e
# set -x
#: Title            : ebuild
#: Date             : 12 April 2014
#: Version          : 2.0
#: Description      : To download and build the development build of emacs. 
#: Requirements     : xorg-dev, libgif-dev, libtiff-dev, ncurses-dev
# Copyright (C) 2014, 2015  Sharon Kimble 
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
####################################################
log=~/logs/emacsbuild2.txt
exec > >(tee -a $log) 2>&1
echo "$(date +%Y-%m-%d\ %H:%M:%S)" >> $log

### First download
#cd ~/git
#bzr branch bzr://bzr.sv.gnu.org/emacs/trunk
#cd ~/git/trunk
#./autogen.sh
#./configure
#export emacs_prefix="/usr/local"
#make
#sudo make install
#cd ~

### 2nd and subsequent downloads
cd ~
if [ -d "$HOME/.emacs.d/build/" ]
then
    echo;
else
    mkdir "$HOME/.emacs.d/build/"; cd ~ ; echo;
fi
cp /usr/local/bin/emacs-24.4.50 $HOME/.emacs.d/build/emacs-24.4.50-$(date +%Y%m%d-%R)
cp /usr/local/bin/emacsclient $HOME/.emacs.d/build/emacsclient-$(date +%Y%m%d-%R)
cp /usr/local/bin/emacs $HOME/.emacs.d/build/emacs-$(date +%Y%m%d-%R)
cd ~/git/trunk
#bzr branch bzr://bzr.sv.gnu.org/emacs/trunk
bzr pull
./autogen.sh
./configure
export emacs_prefix="/usr/local"
make
sudo make install
cd ~

Instructions

For the first time you use it uncomment the first section, and comment out the second section, and then run the script.

For the second, and subsequent times, comment out the first section and uncomment out the second stage, and then run the script. You will find that it copies several files from /usr/local/bin to $HOME/.emacs.d/build/ and saves them with today's date and time. This is to stop them being over-written in case your current build fails, you still have a good working file ready for use.

One thing that you have to bear in mind is that connecting to savannah for the first time and initialising your repo of emacs trunk build is that it may take some time! From start to finish when I did it was 40 minutes, time for you to make a cup of tea even! :)



Comments

comments powered by Disqus