:: commit 290dc4da50360b26fde22ce10e64bb70439df82d

mintsuki <mintsuki@protonmail.com> — 2024-01-13 19:04

parents: f1959d2d05

build: bootstrap: Do not reclone repos if missing .git

diff --git a/bootstrap b/bootstrap
index 50e98647..37fc9beb 100755
--- a/bootstrap
+++ b/bootstrap
@@ -26,10 +26,12 @@ TINF_COMMIT_HASH=57ffa1f1d5e3dde19011b2127bd26d01689b694b
 clone_repo_commit() {
     [ -d $2 ] && (
         set -e
-        git -C $2 checkout $3 || (
-            set -e
-            rm -rf $2
-        )
+        if [ -f $2/.git ]; then
+            git -C $2 checkout $3 || (
+                set -e
+                rm -rf $2
+            )
+        fi
     )
     [ -d $2 ] || (
         set -e
tab: 248 wrap: offon