mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-07-19 20:59:02 +02:00
36 lines
766 B
Python
Executable File
36 lines
766 B
Python
Executable File
#!/usr/bin/env python3
|
|
#
|
|
# Unpack a shared directory of repos to the autobuilder working directory
|
|
#
|
|
# Called with $1 - The json file containing the repositories to use
|
|
# $2 - The shared directory where the repos are to be transferred from (can be 'None')
|
|
# $3 - The autobuilder working directory
|
|
#
|
|
|
|
import json
|
|
import os
|
|
import sys
|
|
import subprocess
|
|
import errno
|
|
|
|
import utils
|
|
|
|
if len(sys.argv) != 4:
|
|
print("Incorrect number of parameters, please call as %s repo.json")
|
|
sys.exit(1)
|
|
|
|
repojson = sys.argv[1]
|
|
shared = sys.argv[2]
|
|
targetdir = sys.argv[3]
|
|
|
|
ourconfig = utils.loadconfig(__file__)
|
|
|
|
with open(repojson) as f:
|
|
repos = json.load(f)
|
|
|
|
if shared:
|
|
"cp shared targetdir"
|
|
else:
|
|
"prepare-shared-repos repojson targetdir"
|
|
|