From 35133aae522610934b42bd3ebf51fa24724ea709 Mon Sep 17 00:00:00 2001 From: Michele Tartara <mtartara@google.com> Date: Wed, 10 Apr 2013 08:48:41 +0000 Subject: [PATCH] Set the default editor inside the chroot Allows the chroot builder to set the default editor to be used in the chroot. Vim is used as the default choice. Signed-off-by: Michele Tartara <mtartara@google.com> Reviewed-by: Helga Velroyen <helgav@google.com> --- devel/build_chroot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/devel/build_chroot b/devel/build_chroot index 5bcdce6be..228e58903 100755 --- a/devel/build_chroot +++ b/devel/build_chroot @@ -5,6 +5,7 @@ : ${DIST_RELEASE=squeeze} : ${CONF_DIR:=/etc/schroot/chroot.d} : ${CHROOT_DIR:=/srv/chroot} +: ${ALTERNATIVE_EDITOR:=/usr/bin/vim.basic} #Automatically generated variables CHROOTNAME=$DIST_RELEASE-$ARCH @@ -150,6 +151,10 @@ in_chroot -- \ in_chroot -- \ cabal install --global shelltestrunner +#Set default editor +in_chroot -- \ + update-alternatives --set editor $ALTERNATIVE_EDITOR + rm -f $COMP_FILEPATH echo "Creating compressed schroot image..." cd $CHDIR -- GitLab