Link with component build shared libraries

This commit is contained in:
Cheng Zhao 2015-04-02 14:05:43 +08:00
parent 19198a579a
commit 7e41b9e44d
5 changed files with 39 additions and 46 deletions

View file

@ -13,42 +13,43 @@ DOWNLOAD_DIR = os.path.join(VENDOR_DIR, 'download')
def main():
args = parse_args()
return (update_submodules() or
download_libchromiumcontent(args.commit, args.url))
args = parse_args()
return (update_submodules() or
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')
return parser.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')
return parser.parse_args()
def update_submodules():
return (subprocess.call(['git', 'submodule', 'sync', '--quiet']) or
subprocess.call(['git', 'submodule', 'update', '--init',
'--recursive']))
return
return (subprocess.call(['git', 'submodule', 'sync', '--quiet']) or
subprocess.call(['git', 'submodule', 'update', '--init',
'--recursive']))
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', '-c', commit, url,
os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')])
mkdir_p(DOWNLOAD_DIR)
download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
'download')
return subprocess.call([sys.executable, download, '-f', '-c', commit, url,
os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')])
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.makedirs(path)
except OSError as e:
if e.errno != errno.EEXIST:
raise
if __name__ == '__main__':
sys.exit(main())
sys.exit(main())