Merge pull request #49 from brightray/commit-argument
Enable passing --commit to download script
This commit is contained in:
commit
b1eed728b5
2 changed files with 6 additions and 4 deletions
|
@ -15,11 +15,13 @@ DOWNLOAD_DIR = os.path.join(VENDOR_DIR, 'download')
|
|||
def main():
|
||||
args = parse_args()
|
||||
return (update_submodules() or
|
||||
download_libchromiumcontent(args.url))
|
||||
download_libchromiumcontent(args.commit, args.url))
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Bootstrap this project')
|
||||
parser.add_argument('-c', '--commit', nargs='?', default='HEAD',
|
||||
help='The commit of libchromiumcontent to download.')
|
||||
parser.add_argument('url', help='The base URL from which to download '
|
||||
'libchromiumcontent (i.e., the URL you passed to '
|
||||
'libchromiumcontent\'s script/upload script')
|
||||
|
@ -32,11 +34,11 @@ def update_submodules():
|
|||
'--recursive']))
|
||||
|
||||
|
||||
def download_libchromiumcontent(url):
|
||||
def download_libchromiumcontent(commit, url):
|
||||
mkdir_p(DOWNLOAD_DIR)
|
||||
download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
|
||||
'download')
|
||||
return subprocess.call([sys.executable, download, '-f', url,
|
||||
return subprocess.call([sys.executable, download, '-f', '-c', commit, url,
|
||||
os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')])
|
||||
|
||||
|
||||
|
|
2
brightray/vendor/libchromiumcontent
vendored
2
brightray/vendor/libchromiumcontent
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 2cd1a60b38babd5ec13884905422778f390a9bc0
|
||||
Subproject commit 0027a764ce54f20ddcabe6f946e8bd6c07325b0a
|
Loading…
Reference in a new issue