mkrootfs

Carbs rootfs generator
git clone git://git.carbslinux.org/mkrootfs
Log | Files | Refs | README | LICENSE

commit 96c5f0bc1102d094cf222dcef5c4e744d298ebbe
parent 011cfae08c1409ef012480cc90ce30159ecb2a16
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed, 13 May 2020 03:18:28 +0300

simplify repository checking

Diffstat:
Mmkrootfs.sh | 19++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/mkrootfs.sh b/mkrootfs.sh @@ -63,15 +63,16 @@ msg "Setting KISS_ROOT to $MNTDIR" export KISS_ROOT="$MNTDIR" # Check whether REPO and REPO_PATH variables exist -[ "$REPO" ] && { - # Remove if /tmp/repo already exists - rm -rf /tmp/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" - export KISS_PATH="${HOST_REPO_PATH:-/tmp/repo/core}" -} || die "REPO variable is not set" +[ "$REPO" ] || die "REPO variable is not set" + +# Remove if /tmp/repo already exists +rm -rf /tmp/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" +export KISS_PATH="${HOST_REPO_PATH:-/tmp/repo/core}" + msg "Starting build from the PKGS variable"