| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 import optparse | 6 import optparse |
| 7 import os | 7 import os |
| 8 import re | 8 import re |
| 9 import shutil | 9 import shutil |
| 10 import subprocess | 10 import subprocess |
| 11 import sys | 11 import sys |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 help='only emit the transitive inputs to the irt build') | 208 help='only emit the transitive inputs to the irt build') |
| 209 parser.add_option('--platform', dest='platforms', action='append', | 209 parser.add_option('--platform', dest='platforms', action='append', |
| 210 default=[], | 210 default=[], |
| 211 help='add a platform to build for (x86-32|x86-64)') | 211 help='add a platform to build for (x86-32|x86-64)') |
| 212 parser.add_option('--outdir', dest='outdir', | 212 parser.add_option('--outdir', dest='outdir', |
| 213 help='directory to out irt to') | 213 help='directory to out irt to') |
| 214 (options, args) = parser.parse_args(argv[1:]) | 214 (options, args) = parser.parse_args(argv[1:]) |
| 215 if args or not options.platforms or ( | 215 if args or not options.platforms or ( |
| 216 not options.inputs and not options.outdir): | 216 not options.inputs and not options.outdir): |
| 217 parser.print_help() | 217 parser.print_help() |
| 218 sys.exit(1) | 218 return 1 |
| 219 | 219 |
| 220 if options.inputs: | 220 if options.inputs: |
| 221 PrintInputs(options.platforms) | 221 PrintInputs(options.platforms) |
| 222 else: | 222 else: |
| 223 BuildIRT(options.platforms, options.outdir) | 223 BuildIRT(options.platforms, options.outdir) |
| 224 return 0 |
| 224 | 225 |
| 225 | 226 |
| 226 if __name__ == '__main__': | 227 if __name__ == '__main__': |
| 227 Main(sys.argv) | 228 sys.exit(Main(sys.argv)) |
| OLD | NEW |