Install tomb on mesh images

This commit is contained in:
Bob Mottram 2016-07-27 19:59:51 +01:00
parent 64b218355d
commit 47156dfcf8
2 changed files with 28 additions and 2 deletions

View File

@ -533,6 +533,7 @@ initialise_mesh() {
configure_firewall
install_avahi
install_batman
install_tomb
install_tox
install_web_server
install_zeronet

View File

@ -31,7 +31,33 @@
TOMB_REPO="https://github.com/dyne/Tomb"
TOMB_COMMIT='c80ebd6d6ed77980eb5b559757e03ea13a29bdd1'
function mesh_install_tomb {
chroot ${rootdir} apt-get -y install cryptsetup zsh
if [ ! -d ${rootdir}/$INSTALL_DIR ]; then
mkdir -p ${rootdir}/$INSTALL_DIR
fi
git_clone $TOMB_REPO ${rootdir}/$INSTALL_DIR/tomb
cd ${rootdir}/$INSTALL_DIR/tomb
git checkout $TOMB_COMMIT -b $TOMB_COMMIT
chroot ${rootdir} /bin/bash -x <<EOF
cd $INSTALL_DIR/tomb
make install
EOF
if [ ! -f ${rootdir}/usr/local/bin/tomb ]; then
exit 93462
fi
}
function install_tomb {
if [ $INSTALLING_MESH ]; then
mesh_install_tomb
return
fi
function_check set_repo_commit
set_repo_commit $INSTALL_DIR/tomb "Tomb commit" "$TOMB_COMMIT" $TOMB_REPO
@ -46,9 +72,8 @@ function install_tomb {
if [ ! -d $INSTALL_DIR ]; then
mkdir -p $INSTALL_DIR
fi
cd $INSTALL_DIR
git_clone $TOMB_REPO tomb
git_clone $TOMB_REPO $INSTALL_DIR/tomb
cd $INSTALL_DIR/tomb
git checkout $TOMB_COMMIT -b $TOMB_COMMIT