| 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 fnmatch | 7 import fnmatch |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import sys | 10 import sys |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 record_path = '%s.md5.stamp' % options.jar_path | 31 record_path = '%s.md5.stamp' % options.jar_path |
| 32 md5_check.CallAndRecordIfStale( | 32 md5_check.CallAndRecordIfStale( |
| 33 lambda: build_utils.CheckOutput(jar_cmd, cwd=jar_cwd), | 33 lambda: build_utils.CheckOutput(jar_cmd, cwd=jar_cwd), |
| 34 record_path=record_path, | 34 record_path=record_path, |
| 35 input_paths=class_files, | 35 input_paths=class_files, |
| 36 input_strings=jar_cmd) | 36 input_strings=jar_cmd) |
| 37 | 37 |
| 38 build_utils.Touch(options.jar_path) | 38 build_utils.Touch(options.jar_path) |
| 39 | 39 |
| 40 | 40 |
| 41 def main(argv): | 41 def main(): |
| 42 parser = optparse.OptionParser() | 42 parser = optparse.OptionParser() |
| 43 parser.add_option('--classes-dir', help='Directory containing .class files.') | 43 parser.add_option('--classes-dir', help='Directory containing .class files.') |
| 44 parser.add_option('--jar-path', help='Jar output path.') | 44 parser.add_option('--jar-path', help='Jar output path.') |
| 45 parser.add_option('--excluded-classes', | 45 parser.add_option('--excluded-classes', |
| 46 help='List of .class file patterns to exclude from the jar.') | 46 help='List of .class file patterns to exclude from the jar.') |
| 47 parser.add_option('--stamp', help='Path to touch on success.') | 47 parser.add_option('--stamp', help='Path to touch on success.') |
| 48 | 48 |
| 49 options, _ = parser.parse_args() | 49 options, _ = parser.parse_args() |
| 50 | 50 |
| 51 DoJar(options) | 51 DoJar(options) |
| 52 | 52 |
| 53 if options.stamp: | 53 if options.stamp: |
| 54 build_utils.Touch(options.stamp) | 54 build_utils.Touch(options.stamp) |
| 55 | 55 |
| 56 | 56 |
| 57 if __name__ == '__main__': | 57 if __name__ == '__main__': |
| 58 sys.exit(main(sys.argv)) | 58 sys.exit(main()) |
| 59 | 59 |
| OLD | NEW |