From e65779aa0b8708c13da8b3d5de3f228c9932dc0b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 15 Jun 2017 12:43:52 +0100 Subject: [PATCH] Include extra repos --- src/freedombone-image-customise | 13 ++++++++++++- src/freedombone-utils-cmake | 20 ++++++++++++++++++-- src/freedombone-utils-web | 9 ++++++++- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 27e82f68..588e206e 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -983,7 +983,16 @@ function image_install_inadyn { mkdir -p $rootdir/root/build fi chroot "$rootdir" apt-get -yq install build-essential curl libgnutls28-dev automake1.11 libconfuse-dev - git clone $INADYN_REPO $rootdir/root/build/inadyn + + if [ -d /repos/inadyn ]; then + mkdir $rootdir/root/build/inadyn + cp -r -p /repos/inadyn/* $rootdir/root/build/inadyn + cd $rootdir/root/build/inadyn + git pull + else + git clone $INADYN_REPO $rootdir/root/build/inadyn + fi + if [ ! -d $rootdir/root/build/inadyn ]; then echo 'Failed to clone inadyn' exit 728252 @@ -1225,6 +1234,8 @@ function image_preinstall_repos { if [ ! -d $rootdir/repos ]; then mkdir $rootdir/repos fi + git clone $CMAKE_REPO $rootdir/repos/cmake + git clone $INADYN_REPO $rootdir/repos/inadyn git clone $CRYPTPAD_REPO $rootdir/repos/cryptpad git clone $DOKUWIKI_REPO $rootdir/repos/dokuwiki git clone $ETHERPAD_REPO $rootdir/repos/etherpad diff --git a/src/freedombone-utils-cmake b/src/freedombone-utils-cmake index 8341ae82..28e601c5 100755 --- a/src/freedombone-utils-cmake +++ b/src/freedombone-utils-cmake @@ -38,7 +38,15 @@ function mesh_install_cmake { chroot "$rootdir" apt-get -yq install build-essential - git clone $CMAKE_REPO $rootdir$INSTALL_DIR/cmake + if [ -d /repos/cmake ]; then + mkdir $rootdir$INSTALL_DIR/cmake + cp -r -p /repos/cmake/* $rootdir$INSTALL_DIR/cmake + cd $rootdir$INSTALL_DIR/cmake + git pull + else + git clone $CMAKE_REPO $rootdir$INSTALL_DIR/cmake + fi + cd $rootdir$INSTALL_DIR/cmake git checkout $CMAKE_COMMIT -b $CMAKE_COMMIT @@ -85,7 +93,15 @@ function install_cmake { apt-get -yq install build-essential - git_clone $CMAKE_REPO $INSTALL_DIR/cmake + if [ -d /repos/cmake ]; then + mkdir $INSTALL_DIR/cmake + cp -r -p /repos/cmake/* $INSTALL_DIR/cmake + cd $INSTALL_DIR/cmake + git pull + else + git_clone $CMAKE_REPO $INSTALL_DIR/cmake + fi + cd $INSTALL_DIR/cmake git checkout $CMAKE_COMMIT -b $CMAKE_COMMIT ./bootstrap diff --git a/src/freedombone-utils-web b/src/freedombone-utils-web index 57c9bc31..a80c65b2 100755 --- a/src/freedombone-utils-web +++ b/src/freedombone-utils-web @@ -441,7 +441,14 @@ function install_dynamicdns { apt-get -yq install build-essential curl libgnutls28-dev automake1.11 if [ ! -d $INSTALL_DIR/inadyn ]; then - git_clone $INADYN_REPO $INSTALL_DIR/inadyn + if [ -d /repos/inadyn ]; then + mkdir $INSTALL_DIR/inadyn + cp -r -p /repos/inadyn/* $INSTALL_DIR/inadyn + cd $INSTALL_DIR/inadyn + git pull + else + git_clone $INADYN_REPO $INSTALL_DIR/inadyn + fi fi if [ ! -d $INSTALL_DIR/inadyn ]; then echo 'inadyn repo not cloned'