dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit 9cc3a30e271546d54c853bf090e031a83d508e9b
parent bad8ae9370bd7fc8c60eb931dc68540deacf440c
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat, 25 Mar 2017 22:44:00 +0000

Add .containers/emacs-build

Diffstat:
.containers/emacs-build | 50++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+), 0 deletions(-)

diff --git a/.containers/emacs-build b/.containers/emacs-build @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Copyright © 2017 rsiddharth <s@ricketyspace.net> +# License: GNU General Public License version 3 or higher. +# +# systemd-nspawn container for building/making emacs + +PWD=`pwd` +CONTAINER_DIR="boxes" +CONTAINER_NAME="emacs-build" +CONTAINER=$CONTAINER_DIR'/'$CONTAINER_NAME +SCRIPT=`basename "$0"` + +EMACS_DIR=$HOME"/v/git/others/emacs" + +if [ "$1" = "bootstrap" ]; then + echo 'debootstraping' + mkdir -p $CONTAINER_DIR + sudo debootstrap --arch=amd64 testing $CONTAINER + echo 'starting container' + sudo systemd-nspawn -D ./$CONTAINER \ + --bind-ro=$PWD/$SCRIPT:/root/$SCRIPT \ + /root/$SCRIPT install +elif [ "$1" = "install" ]; then + echo 'installing paraphernalia in container' + echo "deb-src http://deb.debian.org/debian testing main" >> \ + /etc/apt/sources.list + apt-get update -y + apt-get install -y build-essential libtiff5-dev libgtk-3-dev \ + libxpm-dev libgif-dev libgnutls28-dev \ + libncurses-dev git mailutils texinfo + apt-get build-dep -y emacs +elif [ "$1" = "start" ]; then + echo 'starting container' + sudo systemd-nspawn --setenv=DISPLAY=:0.0 \ + -D ./$CONTAINER \ + --bind-ro=$PWD/$SCRIPT:/root/$SCRIPT \ + --bind=$EMACS_DIR:/root/emacs \ + /root/$SCRIPT make-emacs +elif [ "$1" = "make-emacs" ]; then + cd /root/emacs + git pull + ./autogen.sh all + ./configure --with-mailutils + make bootstrap +else + echo 'Dunno what to do' + exit 1 +fi +