aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2013-01-24 17:40:22 +0100
committerMilo Casagrande <milo@ubuntu.com>2013-01-24 17:40:22 +0100
commite1c6c49d20afe234a0e85621420e79da606319db (patch)
tree2818723b922ad76c5429f2ab047e7f6050d4b1fa
parente3a4b8dc413a1c1b15d7daf7d1fb638849df5b4d (diff)
Skip repository if directory is already on the filesystem.milo
-rw-r--r--scripts/mirror-repos3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/mirror-repos b/scripts/mirror-repos
index c918d9f..154405b 100644
--- a/scripts/mirror-repos
+++ b/scripts/mirror-repos
@@ -59,6 +59,9 @@ def mirror_repos(file, dest, user=None):
# Maintain the same directory layout of original git.linaro.org.
full_path = os.path.join(dest, line.split(base_dir)[0])
+ # Skip if repository is already there.
+ if os.path.exists(os.path.join(full_path, base_dir)):
+ continue
# We need to do so, to create the directory as the RhodeCode user
# for our installation.
cmd_args = ["mkdir", "-p", full_path]