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

This commit is contained in:
mintsuki 2024-01-13 20:04:18 +01:00
parent 6083d78e73
commit f4dbe3e9af
1 changed files with 6 additions and 4 deletions

View File

@ -26,10 +26,12 @@ TINF_COMMIT_HASH=57ffa1f1d5e3dde19011b2127bd26d01689b694b
clone_repo_commit() {
[ -d $2 ] && (
set -e
if [ -f $2/.git ]; then
git -C $2 checkout $3 || (
set -e
rm -rf $2
)
fi
)
[ -d $2 ] || (
set -e