Carbs rootfs generator
git clone git://
Log | Files | Refs | README | LICENSE

commit b0d40c129dcde67710314365477dec3ef0d1d6c8
parent a1acebc4ca699da837c1f063983e9aa046ed75af
Author: Cem Keylan <>
Date:   Mon, 18 May 2020 12:31:21 +0300

mkrootfs: do not clone the same repository twice

Diffstat: | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/ b/ @@ -77,12 +77,16 @@ export KISS_ROOT="$MNTDIR" # Check whether REPO and REPO_PATH variables exist [ "$REPO" ] || die "REPO variable is not set" -# Remove if /tmp/repo already exists -rm -rf /tmp/repo +# Create parent directories for the repositories, and +# remove pre-existing repositories. We then shallow +# clone the repositories to both locations. +msg "Cloning repository" +mkdir -p "$MNTDIR/var/db/kiss" /tmp +rm -rf /tmp/repo "$MNTDIR/var/db/kiss/repo" git clone --depth 1 "$REPO" /tmp/repo -msg "Cloning repository to /var/db/kiss/repo" -rm -rf "$MNTDIR/var/db/kiss/repo" -git clone --depth 1 "$REPO" "$MNTDIR/var/db/kiss/repo" +cp -r /tmp/repo "$MNTDIR/var/db/kiss/repo" + +# We export the new KISS_PATH export KISS_PATH="${HOST_REPO_PATH:-/tmp/repo/core}" msg "Starting build from the PKGS variable"