aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-13 03:18:28 +0300
committerCem Keylan <cem@ckyln.com>2020-05-13 03:18:28 +0300
commit96c5f0bc1102d094cf222dcef5c4e744d298ebbe (patch)
tree6c912240fa424398a6db6ed618fbb85180737af2
parent011cfae08c1409ef012480cc90ce30159ecb2a16 (diff)
downloadmkrootfs-96c5f0bc1102d094cf222dcef5c4e744d298ebbe.tar.gz
simplify repository checking
-rwxr-xr-xmkrootfs.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/mkrootfs.sh b/mkrootfs.sh
index 6767911..18a8981 100755
--- 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"