| 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 """MB - the Meta-Build wrapper around GYP and GN | 6 """MB - the Meta-Build wrapper around GYP and GN |
| 7 | 7 |
| 8 MB is a wrapper script for GYP and GN that can be used to generate build files | 8 MB is a wrapper script for GYP and GN that can be used to generate build files |
| 9 for sets of canned configurations and analyze them. | 9 for sets of canned configurations and analyze them. |
| 10 """ | 10 """ |
| 11 | 11 |
| 12 # TODO(thomasanderson): Remove this comment. It is added to |
| 13 # workaround https://crbug.com/736215 for CL |
| 14 # https://codereview.chromium.org/2974603002/ |
| 15 |
| 12 from __future__ import print_function | 16 from __future__ import print_function |
| 13 | 17 |
| 14 import argparse | 18 import argparse |
| 15 import ast | 19 import ast |
| 16 import errno | 20 import errno |
| 17 import json | 21 import json |
| 18 import os | 22 import os |
| 19 import pipes | 23 import pipes |
| 20 import pprint | 24 import pprint |
| 21 import re | 25 import re |
| (...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1539 # Then check to see if the arg contains any metacharacters other than | 1543 # Then check to see if the arg contains any metacharacters other than |
| 1540 # double quotes; if it does, quote everything (including the double | 1544 # double quotes; if it does, quote everything (including the double |
| 1541 # quotes) for safety. | 1545 # quotes) for safety. |
| 1542 if any(a in UNSAFE_FOR_CMD for a in arg): | 1546 if any(a in UNSAFE_FOR_CMD for a in arg): |
| 1543 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1547 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
| 1544 return arg | 1548 return arg |
| 1545 | 1549 |
| 1546 | 1550 |
| 1547 if __name__ == '__main__': | 1551 if __name__ == '__main__': |
| 1548 sys.exit(main(sys.argv[1:])) | 1552 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |