From 8de7bc93397a95312b742bc5af733208f702f3a8 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 20 Oct 2023 08:54:01 +0100 Subject: include/git: don't re-download single-trees only do it if the target source tree does not exist Signed-off-by: Leah Rowe --- include/git.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/git.sh b/include/git.sh index 7f4b1f40..e08d0ae4 100755 --- a/include/git.sh +++ b/include/git.sh @@ -98,6 +98,10 @@ clone_project() loc="${loc#src/}" loc="src/${loc}" + if [ -d "${loc}" ]; then + printf "%s already exists, so skipping download\n" 1>&2 + return 0 + fi git clone ${url} "${tmp_git_dir}" || \ git clone ${bkup_url} "${tmp_git_dir}" || \ -- cgit v1.2.1