Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2008 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 '''Tool to determine inputs and outputs of a grit file. | 6 '''Tool to determine inputs and outputs of a grit file. |
| 7 ''' | 7 ''' |
| 8 | 8 |
| 9 import optparse | 9 import optparse |
| 10 import os | 10 import os |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 print '\n'.join(inputs) | 102 print '\n'.join(inputs) |
| 103 elif options.outputs: | 103 elif options.outputs: |
| 104 if len(args) < 2: | 104 if len(args) < 2: |
| 105 PrintUsage() | 105 PrintUsage() |
| 106 return 1 | 106 return 1 |
| 107 | 107 |
| 108 for f in args[1:]: | 108 for f in args[1:]: |
| 109 outputs = [posixpath.join(args[0], f) for f in Outputs(f, defines)] | 109 outputs = [posixpath.join(args[0], f) for f in Outputs(f, defines)] |
| 110 print '\n'.join(outputs) | 110 print '\n'.join(outputs) |
| 111 else: | 111 else: |
| 112 PringUsage() | 112 PrintUsage() |
|
tony
2011/01/14 19:53:10
D'oh
| |
| 113 return 1 | 113 return 1 |
| 114 return 0 | 114 return 0 |
| 115 | 115 |
| 116 | 116 |
| 117 if __name__ == '__main__': | 117 if __name__ == '__main__': |
| 118 sys.exit(main(sys.argv)) | 118 sys.exit(main(sys.argv)) |
| OLD | NEW |