Index: gn_data_build_system/run.py |
diff --git a/gn_data_build_system/run.py b/gn_data_build_system/run.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4eccace608e318378b2cbbc74b2c4ed9022b2e60 |
--- /dev/null |
+++ b/gn_data_build_system/run.py |
@@ -0,0 +1,23 @@ |
+#!/usr/bin/env python |
+# Copyright 2014 the V8 project authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+"""This program wraps an arbitrary command since gn currently can only execute |
+scripts.""" |
+ |
+import os |
+import subprocess |
+import sys |
+ |
+try: |
+ res = subprocess.call(sys.argv[1:]) |
+except Exception as e: |
+ res = 1 |
+ print("%s" % e) |
+ |
+if res != 0: |
+ print("In %s" % os.getcwd()) |
+ print("%s" % sys.argv) |
+ |
+sys.exit(res) |