Skip to content

Commit

Permalink
Merge pull request #611 from dreispt/dr-imp-clone
Browse files Browse the repository at this point in the history
[IMP] clone_everything: print cloning progress
  • Loading branch information
sbidoul committed May 1, 2024
2 parents 400ffa9 + 8a0e185 commit 251e678
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/clone_everything.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

def clone(organization_remotes=None, remove_old_repos=False, target_branch=False):
for project in OCA_REPOSITORY_NAMES:
print("Cloning %s ..." % project)
cmd = ["git", "clone", "--quiet", url(project), project]
if target_branch:
cmd += ["-b", target_branch]
Expand All @@ -35,12 +36,14 @@ def clone(organization_remotes=None, remove_old_repos=False, target_branch=False
]
subprocess.call(cmd)
if remove_old_repos:
print("Removing old repositories")
for d in os.listdir("."):
if (
d not in OCA_REPOSITORY_NAMES
and os.path.isdir(d)
and os.path.isdir(os.path.join(d, ".git"))
):
print("... removing %s" % d)
subprocess.check_call(["rm", "-fr", d])


Expand Down

0 comments on commit 251e678

Please sign in to comment.