| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """Generates the contents of an Cronet LICENSE file for the third-party code. | 6 """Generates the contents of an Cronet LICENSE file for the third-party code. |
| 7 | 7 |
| 8 It makes use of src/tools/licenses.py and the README.chromium files on which | 8 It makes use of src/tools/licenses.py and the README.chromium files on which |
| 9 it depends. Based on android_webview/tools/webview_licenses.py. | 9 it depends. Based on android_webview/tools/webview_licenses.py. |
| 10 """ | 10 """ |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 if _.gn: | 106 if _.gn: |
| 107 global third_party_dirs | 107 global third_party_dirs |
| 108 third_party_dirs = FindThirdPartyDeps(os.getcwd()) | 108 third_party_dirs = FindThirdPartyDeps(os.getcwd()) |
| 109 | 109 |
| 110 if not args: | 110 if not args: |
| 111 parser.print_help() | 111 parser.print_help() |
| 112 return 1 | 112 return 1 |
| 113 | 113 |
| 114 if args[0] == 'license': | 114 if args[0] == 'license': |
| 115 if len(args) > 1: | 115 if len(args) > 1: |
| 116 print 'Saving license to %s' % args[1] | |
| 117 f = open(args[1], "w") | 116 f = open(args[1], "w") |
| 118 try: | 117 try: |
| 119 f.write(GenerateLicense()) | 118 f.write(GenerateLicense()) |
| 120 finally: | 119 finally: |
| 121 f.close() | 120 f.close() |
| 122 else: | 121 else: |
| 123 print GenerateLicense() | 122 print GenerateLicense() |
| 124 return 0 | 123 return 0 |
| 125 | 124 |
| 126 parser.print_help() | 125 parser.print_help() |
| 127 return 1 | 126 return 1 |
| 128 | 127 |
| 129 | 128 |
| 130 if __name__ == '__main__': | 129 if __name__ == '__main__': |
| 131 sys.exit(main()) | 130 sys.exit(main()) |
| OLD | NEW |