OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 | |
3 """Bootstrap script to clone and forward to the recipe engine tool.""" | |
4 | |
5 import os | |
6 import subprocess | |
7 import sys | |
8 | |
9 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) | |
10 REPO_ROOT = os.path.dirname(os.path.dirname(SCRIPT_DIR)) | |
11 ENGINE_REPO = '/b/build' | |
12 ENGINE_BRANCH = 'recipe-packages' | |
13 ENGINE_DIR = os.path.join(SCRIPT_DIR, '.recipe_engine') | |
14 ENGINE_SUBDIR = os.path.join(ENGINE_DIR, 'third_party', 'recipe_engine') | |
15 | |
16 if not os.path.exists(ENGINE_DIR): | |
iannucci
2015/08/06 23:57:12
let's use `git rev-parse --something` to find the
| |
17 subprocess.check_call(['git', 'clone', ENGINE_REPO, ENGINE_DIR]) | |
18 | |
19 # TODO(luqui): this stuff is just for pre-move testing | |
20 cwd = os.getcwd() | |
21 os.chdir(ENGINE_DIR) | |
22 subprocess.check_call(['git', 'reset', '--hard', 'origin/%s' % ENGINE_BRANCH]) | |
23 os.chdir(cwd) | |
24 | |
25 args = [sys.argv[0]] + ['--package', REPO_ROOT] + sys.argv[1:] | |
26 os.execvp(os.path.join(ENGINE_SUBDIR, 'recipes.py'), args) | |
OLD | NEW |