libchromiumcontent/script/bootstrap

28 строки
819 B
Plaintext
Исходник Обычный вид История

#!/usr/bin/env python
2013-02-19 01:06:57 +04:00
import os
import subprocess
2013-02-19 01:06:57 +04:00
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DEPOT_TOOLS_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools')
DEPOT_TOOLS_URL = \
'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
2013-02-19 01:06:57 +04:00
def main():
os.chdir(SOURCE_ROOT)
subprocess.check_call(['git', 'submodule', 'sync'])
subprocess.check_call(['git', 'submodule', 'update',
'--init', '--recursive'])
if not os.path.isdir(DEPOT_TOOLS_DIR):
subprocess.check_call(['git', 'clone',
DEPOT_TOOLS_URL, DEPOT_TOOLS_DIR])
update = os.path.join(SOURCE_ROOT, 'script', 'update')
subprocess.check_call(['python', update])
if __name__ == '__main__':
import sys
sys.exit(main())