| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium OS 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 datetime | 6 import datetime |
| 7 import multiprocessing | 7 import multiprocessing |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 Returns | 361 Returns |
| 362 A string path to a make.conf file to be updated. | 362 A string path to a make.conf file to be updated. |
| 363 """ | 363 """ |
| 364 if _HOST_TARGET == target: | 364 if _HOST_TARGET == target: |
| 365 # We are host. | 365 # We are host. |
| 366 # Without more examples of hosts this is a kludge for now. | 366 # Without more examples of hosts this is a kludge for now. |
| 367 # TODO(Scottz): as new host targets come online expand this to | 367 # TODO(Scottz): as new host targets come online expand this to |
| 368 # work more like boards. | 368 # work more like boards. |
| 369 make_path = _PREBUILT_MAKE_CONF[target] | 369 make_path = _PREBUILT_MAKE_CONF[target] |
| 370 elif re.match('.*?-.*?_.*', target): | 370 elif re.match('.*?_.*', target): |
| 371 # We are a board variant | 371 # We are a board variant |
| 372 overlay_str = 'overlay-variant-%s' % target.replace('_', '-') | 372 overlay_str = 'overlay-variant-%s' % target.replace('_', '-') |
| 373 make_path = os.path.join(_BINHOST_BASE_DIR, overlay_str, 'make.conf') | 373 make_path = os.path.join(_BINHOST_BASE_DIR, overlay_str, 'make.conf') |
| 374 elif re.match('.*?-\w+', target): | 374 elif re.match('.*?-\w+', target): |
| 375 overlay_str = 'overlay-%s' % target | 375 overlay_str = 'overlay-%s' % target |
| 376 make_path = os.path.join(_BINHOST_BASE_DIR, overlay_str, 'make.conf') | 376 make_path = os.path.join(_BINHOST_BASE_DIR, overlay_str, 'make.conf') |
| 377 else: | 377 else: |
| 378 raise UnknownBoardFormat('Unknown format: %s' % target) | 378 raise UnknownBoardFormat('Unknown format: %s' % target) |
| 379 | 379 |
| 380 return os.path.join(make_path) | 380 return os.path.join(make_path) |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 options.binhost_base_url, git_sync=options.git_sync) | 486 options.binhost_base_url, git_sync=options.git_sync) |
| 487 | 487 |
| 488 if options.board: | 488 if options.board: |
| 489 UploadPrebuilt(options.build_path, options.upload, version, | 489 UploadPrebuilt(options.build_path, options.upload, version, |
| 490 options.binhost_base_url, board=options.board, | 490 options.binhost_base_url, board=options.board, |
| 491 git_sync=options.git_sync) | 491 git_sync=options.git_sync) |
| 492 | 492 |
| 493 | 493 |
| 494 if __name__ == '__main__': | 494 if __name__ == '__main__': |
| 495 main() | 495 main() |
| OLD | NEW |