yocto-autobuilder-helper/scripts/prepare-shared-repos
Richard Purdie 7f70683c57 prepare-shared-repos/shared-repo-unpack: Allow future option to filter repos and implement more functionality
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-22 16:12:34 +00:00

736 B
Executable File

#!/usr/bin/env python3

Iterate over a set of repositories in a json file and setup a shared directory containing them

Called with $1 - The json file containing the repositories to use

$2 - The shared directory where the repos are to be transferred

import json import os import sys import subprocess import errno

import utils

if len(sys.argv) != 3: print("Incorrect number of parameters, please call as %s repo.json") sys.exit(1)

repojson = sys.argv[1] shared = sys.argv[2]

ourconfig = utils.loadconfig(file)

with open(repojson) as f: repos = json.load(f)

stashdir = ourconfig["REPO_STASH_DIR"]

for repo in sorted(repos.keys()): utils.fetchgitrepo(shared, repo, repos[repo], stashdir)