diff options
Diffstat (limited to 'docker/scripts/lib_common.sh')
-rw-r--r-- | docker/scripts/lib_common.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/docker/scripts/lib_common.sh b/docker/scripts/lib_common.sh index 3449bf398..39f439f63 100644 --- a/docker/scripts/lib_common.sh +++ b/docker/scripts/lib_common.sh @@ -249,14 +249,20 @@ export DOCKER_APT_DEBIAN_DOCKER_GPGFILE="$DOCKER_GPG_KEY_DIR/$APT_DEBIAN_DOCKER_ export DOCKER_DOWNLOADS_DIR="/root/Downloads" docker_build_setup_ciman() { - mkdir -p $DOCKER_BUILD_DIR $DOCKER_GPG_KEY_DIR - if [ "$(dirname $CIMAN_ROOT)" != "$DOCKER_BUILD_DIR" ] ; then - echo_log "Syncing $CIMAN_ROOT into $DOCKER_CIMAN_ROOT..." + echo_log "Updating $CIMAN_ROOT git submodules..." pushd $CIMAN_ROOT git submodule update --init --recursive popd + if [ -d "$DOCKER_BUILD_DIR" ] ; then + echo_log "Removing existing DOCKER_BUILD_DIR: $DOCKER_BUILD_DIR..." + rm -rf $DOCKER_BUILD_DIR + fi + echo_log "Syncing $CIMAN_ROOT into $DOCKER_CIMAN_ROOT..." + mkdir -p $DOCKER_BUILD_DIR $DOCKER_GPG_KEY_DIR rsync -a $CIMAN_ROOT/. $DOCKER_CIMAN_ROOT + else + mkdir -p $DOCKER_BUILD_DIR $DOCKER_GPG_KEY_DIR fi } |