OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import os | 6 import os |
7 import sys | 7 import sys |
8 | 8 |
9 _CATAPULT = os.path.abspath( | 9 _CATAPULT = os.path.abspath( |
10 os.path.join(os.path.dirname(__file__), | 10 os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) |
11 os.path.pardir, os.path.pardir, os.path.pardir)) | |
12 | 11 |
13 | 12 |
14 def _AddToPathIfNeeded(path): | 13 def _AddToPathIfNeeded(path): |
15 if path not in sys.path: | 14 if path not in sys.path: |
16 sys.path.insert(0, path) | 15 sys.path.insert(0, path) |
17 | 16 |
18 | 17 |
19 if __name__ == '__main__': | 18 if __name__ == '__main__': |
20 _AddToPathIfNeeded(_CATAPULT) | 19 _AddToPathIfNeeded(_CATAPULT) |
| 20 |
| 21 from hooks import install |
| 22 if '--no-install-hooks' in sys.argv: |
| 23 sys.argv.remove('--no-install-hooks') |
| 24 else: |
| 25 install.InstallHooks() |
| 26 |
21 from catapult_build import run_with_typ | 27 from catapult_build import run_with_typ |
22 sys.exit(run_with_typ.Run( | 28 sys.exit(run_with_typ.Run( |
23 os.path.join(_CATAPULT, 'tracing', 'third_party', 'tvcm'))) | 29 os.path.join(_CATAPULT, 'third_party', 'py_vulcanize'))) |
24 | 30 |
OLD | NEW |