From e6540a6d14f3028fb69399726c43c2e4f46a310d Mon Sep 17 00:00:00 2001 From: Dirk Heilig Date: Mon, 17 Apr 2023 22:34:48 +0200 Subject: [PATCH] fix clean checkout --- builder | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builder b/builder index 3262551..b009160 100755 --- a/builder +++ b/builder @@ -6,15 +6,14 @@ REPO="https://git.c3re.de/c3re/test-website.git" refresh() { cd - test -d site/.git || { - test -d site && rm -rf site + test -d site/ || { + rm -rf site git clone --recursive "$REPO" site } cd site git pull - # iterate over all branches and checkout that branch for branch in $(git branch -a | grep remotes | grep -v HEAD); do branch=${branch#remotes/origin/} git checkout "$branch"