OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import optparse | 7 import optparse |
8 import os | 8 import os |
9 import sys | 9 import sys |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 if options.excluded_classes: | 69 if options.excluded_classes: |
70 excluded_classes = build_utils.ParseGypList(options.excluded_classes) | 70 excluded_classes = build_utils.ParseGypList(options.excluded_classes) |
71 | 71 |
72 if options.strip_resource_classes_for: | 72 if options.strip_resource_classes_for: |
73 packages = build_utils.ParseGypList(options.strip_resource_classes_for) | 73 packages = build_utils.ParseGypList(options.strip_resource_classes_for) |
74 excluded_classes.extend(p.replace('.', '/') + '/' + f | 74 excluded_classes.extend(p.replace('.', '/') + '/' + f |
75 for p in packages for f in _RESOURCE_CLASSES) | 75 for p in packages for f in _RESOURCE_CLASSES) |
76 | 76 |
77 predicate = None | 77 predicate = None |
78 if excluded_classes: | 78 if excluded_classes: |
79 print excluded_classes | |
80 predicate = lambda f: not build_utils.MatchesGlob(f, excluded_classes) | 79 predicate = lambda f: not build_utils.MatchesGlob(f, excluded_classes) |
81 | 80 |
82 with build_utils.TempDir() as temp_dir: | 81 with build_utils.TempDir() as temp_dir: |
83 classes_dir = options.classes_dir | 82 classes_dir = options.classes_dir |
84 if options.input_jar: | 83 if options.input_jar: |
85 build_utils.ExtractAll(options.input_jar, temp_dir) | 84 build_utils.ExtractAll(options.input_jar, temp_dir) |
86 classes_dir = temp_dir | 85 classes_dir = temp_dir |
87 JarDirectory(classes_dir, options.jar_path, predicate=predicate) | 86 JarDirectory(classes_dir, options.jar_path, predicate=predicate) |
88 | 87 |
89 if options.stamp: | 88 if options.stamp: |
90 build_utils.Touch(options.stamp) | 89 build_utils.Touch(options.stamp) |
91 | 90 |
92 | 91 |
93 if __name__ == '__main__': | 92 if __name__ == '__main__': |
94 sys.exit(main()) | 93 sys.exit(main()) |
95 | 94 |
OLD | NEW |