COPY mass-delta-builder/pre_run.sh /app/
COPY mass-delta-builder/mass-delta-builder.py /app/
+ARG CFG_GIT_CLONE_PATH
+ARG CFG_GIT_BRANCH
+
+RUN git clone "$CFG_GIT_CLONE_PATH" /tota-upg/mk_delta/temp && \
+ git --git-dir=/tota-upg/mk_delta/temp/.git --work-tree=/tota-upg/mk_delta/temp checkout "$CFG_GIT_BRANCH" && \
+ rm -rf /tota-upg/mk_delta/temp/.git && \
+ bash /tota-upg/scripts/directory-setup.sh /tota-upg/mk_delta/temp/ && \
+ cp -r /tota-upg/mk_delta/temp/* /tota-upg/mk_delta/ && \
+ rm -rf /tota-upg/mk_delta/temp/
+
WORKDIR /app
VOLUME /images/
#!/bin/sh
-exec docker build --no-cache -t upgrade-tools:latest .
+if [ -z "${DOCKER_CFG_GIT_CLONE_PATH}" ]; then
+ DOCKER_CFG_GIT_CLONE_PATH="git://git.tizen.org/platform/core/system/plugin/upgrade-tools-generic"
+fi
+
+if [ -z "${DOCKER_CFG_GIT_BRANCH}" ]; then
+ DOCKER_CFG_GIT_BRANCH="origin/tizen"
+fi
+
+exec docker build --build-arg CFG_GIT_CLONE_PATH="${DOCKER_CFG_GIT_CLONE_PATH}" \
+ --build-arg CFG_GIT_BRANCH="${DOCKER_CFG_GIT_BRANCH}" --no-cache -t upgrade-tools:latest .
+++ /dev/null
-# Configuration for generation of delta
-# Filesystem label, bin name (in tar), delta name, update type, blk dev, blk offset
-BOOT boot.img boot.img FULL_IMAGE:BEFORE_BOOT_FOTA /dev/mmcblk0p1 0
-hal hal.img hal.img DELTA_IMAGE:AT_BOOT_FOTA /dev/mmcblk0p10 0
-modules modules.img modules.img FULL_IMAGE:BEFORE_BOOT_FOTA /dev/mmcblk0p6 0
-rootfs rootfs.img rootfs.img DELTA_IMAGE:AT_BOOT_FOTA /dev/mmcblk0p2 0
-ramdisk ramdisk.img ramdisk.img FULL_IMAGE:AT_BOOT_FOTA /dev/mmcblk0p7 0
-ramdisk-recovery ramdisk-recovery.img ramdisk-recovery.img FULL_IMAGE:BEFORE_BOOT_FOTA /dev/mmcblk0p8 0
--- /dev/null
+#!/bin/bash
+
+ROOT_DIR=$1
+
+for DIR in "${ROOT_DIR}"/*/; do
+ mkdir -p "${DIR}"/data/new_tar
+ mkdir -p "${DIR}"/data/old_tar
+done