Chris Craik | 93216d0 | 2015-03-05 13:58:42 -0800 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
| 6 | import os |
| 7 | import sys |
| 8 | |
| 9 | if __name__ == '__main__': |
Chris Craik | 44c2820 | 2015-05-12 17:25:16 -0700 | [diff] [blame^] | 10 | # This pre-commit hook was replaced by a pre-submit hook (see PRESUBMIT.py). |
| 11 | sys.exit(0) |
| 12 | |
Chris Craik | 93216d0 | 2015-03-05 13:58:42 -0800 | [diff] [blame] | 13 | f = __file__ |
| 14 | if os.path.islink(f): |
| 15 | f = os.path.abspath(os.path.join(os.path.dirname(f), os.readlink(f))) |
| 16 | top_dir = os.path.abspath(os.path.join(os.path.dirname(f), '..')) |
| 17 | sys.path.append(top_dir) |
| 18 | from hooks import pre_commit |
| 19 | sys.exit(pre_commit.Main(sys.argv[1:])) |