Index: scripts/slave/recipes.py |
diff --git a/scripts/slave/recipes.py b/scripts/slave/recipes.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..31266e09fec1c9f0e3c3a4755eeef2d551c9f309 |
--- /dev/null |
+++ b/scripts/slave/recipes.py |
@@ -0,0 +1,26 @@ |
+#!/usr/bin/env python |
+ |
+"""Bootstrap script to clone and forward to the recipe engine tool.""" |
+ |
+import os |
+import subprocess |
+import sys |
+ |
+SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) |
+REPO_ROOT = os.path.dirname(os.path.dirname(SCRIPT_DIR)) |
+ENGINE_REPO = '/b/build' |
+ENGINE_BRANCH = 'recipe-packages' |
+ENGINE_DIR = os.path.join(SCRIPT_DIR, '.recipe_engine') |
+ENGINE_SUBDIR = os.path.join(ENGINE_DIR, 'third_party', 'recipe_engine') |
+ |
+if not os.path.exists(ENGINE_DIR): |
iannucci
2015/08/06 23:57:12
let's use `git rev-parse --something` to find the
|
+ subprocess.check_call(['git', 'clone', ENGINE_REPO, ENGINE_DIR]) |
+ |
+ # TODO(luqui): this stuff is just for pre-move testing |
+ cwd = os.getcwd() |
+ os.chdir(ENGINE_DIR) |
+ subprocess.check_call(['git', 'reset', '--hard', 'origin/%s' % ENGINE_BRANCH]) |
+ os.chdir(cwd) |
+ |
+args = [sys.argv[0]] + ['--package', REPO_ROOT] + sys.argv[1:] |
+os.execvp(os.path.join(ENGINE_SUBDIR, 'recipes.py'), args) |