cosmetic changes
This commit is contained in:
parent
25f6299558
commit
ae535aa786
1 changed files with 7 additions and 5 deletions
|
@ -73,15 +73,16 @@ def process_repo(repo, args):
|
|||
clone_repo(repo, dir, args)
|
||||
else:
|
||||
if not args.cron: print("Repo already exists, let's try to update it instead")
|
||||
|
||||
update_repo(repo, dir, args)
|
||||
update_repo(repo, dir, args)
|
||||
|
||||
|
||||
def clone_repo(repo, dir, args):
|
||||
params = [repo.repo.ssh_url if args.ssh else repo.git_url, dir]
|
||||
|
||||
if args.mirror:
|
||||
git("clone", ["--mirror", repo.ssh_url if args.ssh else repo.git_url, dir], args.git, dir)
|
||||
else:
|
||||
git("clone", [repo.repo.ssh_url if args.ssh else repo.git_url, dir], args.git, dir)
|
||||
params.insert(0, ["--mirror"])
|
||||
|
||||
git("clone", params, args.git, dir)
|
||||
|
||||
|
||||
def update_repo(repo, dir, args):
|
||||
|
@ -105,6 +106,7 @@ def git(gcmd, args=[], gargs=[], gdir=""):
|
|||
if (gdir):
|
||||
cmd.append("--git-dir")
|
||||
cmd.append(gdir)
|
||||
|
||||
cmd.append(gcmd)
|
||||
cmd.extend(gargs)
|
||||
cmd.extend(args)
|
||||
|
|
Loading…
Add table
Reference in a new issue