dotfiles

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

commit ffc87d2e81186ca04d068ab051129a2df730e32c
parent e9eecabcd51a663ad4aeb3d2e63dbc45538f0c1d
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat, 20 Jan 2018 04:03:42 +0000

.bin/emacs-build: Refactor script.

propellor is taking care of chroot provisioning.

Diffstat:
.bin/emacs-build | 47+++++------------------------------------------
1 file changed, 5 insertions(+), 42 deletions(-)

diff --git a/.bin/emacs-build b/.bin/emacs-build @@ -1,25 +1,17 @@ #!/bin/sh # -# Copyright © 2017 rsiddharth <s@ricketyspace.net> +# Copyright © 2017, 2018 rsiddharth <s@ricketyspace.net> # License: GNU General Public License version 3 or higher. # # systemd-nspawn container for building/making emacs # -# requires: -# -# - debian host -# - debootstrap -# - systemd-container -# - sudo -# # usage: # -# $ emacs-build bootstrap # $ emacs-build make-start # -CONTAINER_DIR=$HOME'/.containers' -CONTAINER_NAME='emacs-build' +CONTAINER_DIR='/var/lib/machines' +CONTAINER_NAME='emacs-builder' CONTAINER=$CONTAINER_DIR'/'$CONTAINER_NAME SCRIPT=`which "$0"` @@ -28,43 +20,14 @@ EMACS_DIR=$HOME'/v/git.sv.gnu.org/emacs' TERMINFO_SRC='/usr/share/terminfo/r/rxvt-256color:' TERMINFO_BIND=$TERMINFO_SRC'/root/.terminfo/r/rxvt-256color' -if [ "$1" = "bootstrap" ]; then - echo 'debootstraping' - mkdir -p $CONTAINER_DIR - [ ! -d $CONTAINER ] && - sudo debootstrap --arch=amd64 stable $CONTAINER - echo 'starting container' - sudo systemd-nspawn -D $CONTAINER \ - --bind-ro=$SCRIPT:/root/$SCRIPT \ - /root/$SCRIPT install -elif [ "$1" = "install" ]; then - echo 'installing paraphernalia in container' - F='/etc/apt/sources.list' && \ - [ `grep deb-src $F | wc -l` = '0' ] && \ - echo 'deb-src http://deb.debian.org/debian stable main' >> $F - apt-get update -y - apt-get install -y build-essential libtiff5-dev libgtk-3-dev \ - libxpm-dev libgif-dev libgnutls28-dev libmagickwand-dev \ - libncurses-dev git mailutils texinfo libacl1-dev - apt-get build-dep -y emacs -elif [ "$1" = "start-container" ]; then - echo 'starting container' - sudo systemd-nspawn --setenv=DISPLAY=:0.0 \ - -D $CONTAINER \ - --bind-ro=$TERMINFO_BIND \ - --bind-ro=$SCRIPT:/root/$SCRIPT \ - --bind=$EMACS_DIR:/root/emacs -elif [ "$1" = "start-make" ]; then +if [ "$1" = "start-make" ]; then echo 'starting container' - sudo systemd-nspawn --setenv=DISPLAY=:0.0 \ + sudo systemd-nspawn \ -D $CONTAINER \ --bind-ro=$SCRIPT:/root/$SCRIPT \ --bind=$EMACS_DIR:/root/emacs \ /root/$SCRIPT make-emacs elif [ "$1" = "make-emacs" ]; then - echo 'updating container' - apt-get update -y - apt-get upgrade -y echo 'building emacs...' cd /root/emacs git pull