From 62b39b7a40db0ed44fb0385779fd8e01c88f65b5 Mon Sep 17 00:00:00 2001 From: rkansal47 Date: Tue, 5 Mar 2024 14:31:00 -0600 Subject: [PATCH] retry git clone --- src/condor/submit.templ.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/condor/submit.templ.sh b/src/condor/submit.templ.sh index 06b56082..27c1102c 100644 --- a/src/condor/submit.templ.sh +++ b/src/condor/submit.templ.sh @@ -8,8 +8,16 @@ # make dir for output mkdir outfiles -# shallow clone of single branch (keep repo size as small as possible) -git clone --single-branch --branch $branch --depth=1 https://github.com/rkansal47/HHbbVV/ +# try 3 times in case of network errors +( + r=3 + # shallow clone of single branch (keep repo size as small as possible) + while ! git clone --single-branch --branch $branch --depth=1 https://github.com/rkansal47/HHbbVV/ + do + ((--r)) || exit + sleep 60 + done +) cd HHbbVV || exit commithash=$$(git rev-parse HEAD)