From a44951bbd3856ea5e6c31b636ef3f465029c60a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Wed, 1 May 2024 10:54:26 +0200 Subject: [PATCH] Avoid cloning repositories every time. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ortega Froysa --- sync.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sync.sh b/sync.sh index 0b1f344..5962f94 100755 --- a/sync.sh +++ b/sync.sh @@ -15,14 +15,15 @@ do if [ -d "$NAME" ] then - rm -r $NAME + cd $NAME + git remote update + else + git clone --mirror $ORIG + cd $NAME fi - git clone --mirror $ORIG - cd $NAME git push --mirror $DEST cd .. - rm -r $NAME echo "Done." done <./repo-list