Download static_library build of libchromiumcontent
This commit is contained in:
		
					parent
					
						
							
								5ef7a0d1da
							
						
					
				
			
			
				commit
				
					
						0ed4626776
					
				
			
		
					 2 changed files with 11 additions and 5 deletions
				
			
		| 
						 | 
					@ -15,13 +15,15 @@ DOWNLOAD_DIR = os.path.join(VENDOR_DIR, 'download')
 | 
				
			||||||
def main():
 | 
					def main():
 | 
				
			||||||
  args = parse_args()
 | 
					  args = parse_args()
 | 
				
			||||||
  return (update_submodules() or
 | 
					  return (update_submodules() or
 | 
				
			||||||
          download_libchromiumcontent(args.commit, args.url))
 | 
					          download_libchromiumcontent(args.dev, args.commit, args.url))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def parse_args():
 | 
					def parse_args():
 | 
				
			||||||
  parser = argparse.ArgumentParser(description='Bootstrap this project')
 | 
					  parser = argparse.ArgumentParser(description='Bootstrap this project')
 | 
				
			||||||
  parser.add_argument('-c', '--commit', nargs='?', default='HEAD',
 | 
					  parser.add_argument('-c', '--commit', nargs='?', default='HEAD',
 | 
				
			||||||
                      help='The commit of libchromiumcontent to download.')
 | 
					                      help='The commit of libchromiumcontent to download.')
 | 
				
			||||||
 | 
					  parser.add_argument('-d', '--dev', action='store_true',
 | 
				
			||||||
 | 
					                      help='Do not download static_library build')
 | 
				
			||||||
  parser.add_argument('url', help='The base URL from which to download '
 | 
					  parser.add_argument('url', help='The base URL from which to download '
 | 
				
			||||||
                      'libchromiumcontent (i.e., the URL you passed to '
 | 
					                      'libchromiumcontent (i.e., the URL you passed to '
 | 
				
			||||||
                      'libchromiumcontent\'s script/upload script')
 | 
					                      'libchromiumcontent\'s script/upload script')
 | 
				
			||||||
| 
						 | 
					@ -35,12 +37,16 @@ def update_submodules():
 | 
				
			||||||
                           '--recursive']))
 | 
					                           '--recursive']))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def download_libchromiumcontent(commit, url):
 | 
					def download_libchromiumcontent(is_dev, commit, url):
 | 
				
			||||||
  mkdir_p(DOWNLOAD_DIR)
 | 
					  mkdir_p(DOWNLOAD_DIR)
 | 
				
			||||||
  download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
 | 
					  download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
 | 
				
			||||||
                          'download')
 | 
					                          'download')
 | 
				
			||||||
  return subprocess.call([sys.executable, download, '-f', '-c', commit, url,
 | 
					  target = os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')
 | 
				
			||||||
                          os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')])
 | 
					  subprocess.check_call([sys.executable, download, '-f', '-c', commit, url,
 | 
				
			||||||
 | 
					                         target])
 | 
				
			||||||
 | 
					  if not is_dev:
 | 
				
			||||||
 | 
					    subprocess.check_call([sys.executable, download, '-s', '-f', '-c', commit,
 | 
				
			||||||
 | 
					                            url, target])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def mkdir_p(path):
 | 
					def mkdir_p(path):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								brightray/vendor/libchromiumcontent
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								brightray/vendor/libchromiumcontent
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
Subproject commit 846a13ae2234490d78568a68f07f5be95c24c0c3
 | 
					Subproject commit 1b7aec028cf86463bc6c00ce15e294cdd157b5c1
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue