OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # |
| 3 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 import optparse |
| 8 import sys |
| 9 |
| 10 # Combines files in |input_files| as one proguard file and write that to |
| 11 # |output_file| |
| 12 def GenerateProguardFile(output_file, input_files): |
| 13 try: |
| 14 with open(output_file, "wb") as target: |
| 15 for input_file in input_files: |
| 16 f = open(input_file, "rb") |
| 17 for line in f: |
| 18 target.write(line) |
| 19 except IOError: |
| 20 raise Exception("Proguard file generation failed") |
| 21 |
| 22 |
| 23 def main(): |
| 24 parser = optparse.OptionParser() |
| 25 parser.add_option('--output-file', |
| 26 help='Output file for the generated proguard file') |
| 27 |
| 28 options, input_files = parser.parse_args() |
| 29 GenerateProguardFile(options.output_file, input_files) |
| 30 |
| 31 |
| 32 if __name__ == '__main__': |
| 33 sys.exit(main()) |
OLD | NEW |