diff options
author | Leah Rowe <leah@libreboot.org> | 2023-10-20 08:54:01 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-10-20 08:54:01 +0100 |
commit | 8de7bc93397a95312b742bc5af733208f702f3a8 (patch) | |
tree | ab390f364edbcd4b905d8dd5fcddb92a0274be4c | |
parent | d1f23eca34a4157e876e451f6fee2109c94d28e9 (diff) |
include/git: don't re-download single-trees
only do it if the target source tree does not exist
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-x | include/git.sh | 4 |
1 files changed, 4 insertions, 0 deletions
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}" || \ |