| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 # | 6 # |
| 7 # A script which will be invoked from gyp to create an SDK. | 7 # A script which will be invoked from gyp to create an SDK. |
| 8 # | 8 # |
| 9 # Usage: create_sdk.py sdk_directory | 9 # Usage: create_sdk.py sdk_directory |
| 10 # | 10 # |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 dom_dest_dir = join(LIB, 'dom') | 349 dom_dest_dir = join(LIB, 'dom') |
| 350 os.makedirs(dom_dest_dir) | 350 os.makedirs(dom_dest_dir) |
| 351 | 351 |
| 352 copyfile(join(dom_src_dir, 'frog', 'dom_frog.dart'), | 352 copyfile(join(dom_src_dir, 'frog', 'dom_frog.dart'), |
| 353 join(dom_dest_dir, 'dom_frog.dart')) | 353 join(dom_dest_dir, 'dom_frog.dart')) |
| 354 | 354 |
| 355 # | 355 # |
| 356 # Create and populate lib/{crypto, json, uri, utf}. | 356 # Create and populate lib/{crypto, json, uri, utf}. |
| 357 # | 357 # |
| 358 | 358 |
| 359 for library in ['crypto', 'json', 'uri', 'utf']: | 359 for library in ['crypto', 'json', 'unittest', 'uri', 'utf']: |
| 360 src_dir = join(HOME, 'lib', library) | 360 src_dir = join(HOME, 'lib', library) |
| 361 dest_dir = join(LIB, library) | 361 dest_dir = join(LIB, library) |
| 362 os.makedirs(dest_dir) | 362 os.makedirs(dest_dir) |
| 363 | 363 |
| 364 for filename in os.listdir(src_dir): | 364 for filename in os.listdir(src_dir): |
| 365 if filename.endswith('.dart'): | 365 if filename.endswith('.dart'): |
| 366 copyfile(join(src_dir, filename), join(dest_dir, filename)) | 366 copyfile(join(src_dir, filename), join(dest_dir, filename)) |
| 367 | 367 |
| 368 # Create and populate lib/dartdoc | 368 # Create and populate lib/dartdoc |
| 369 dartdoc_src_dir = join(HOME, 'lib', 'dartdoc') | 369 dartdoc_src_dir = join(HOME, 'lib', 'dartdoc') |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 if revision is not None: | 514 if revision is not None: |
| 515 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 515 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 516 f.write(revision + '\n') | 516 f.write(revision + '\n') |
| 517 f.close() | 517 f.close() |
| 518 | 518 |
| 519 move(SDK_tmp, SDK) | 519 move(SDK_tmp, SDK) |
| 520 utils.Touch(os.path.join(SDK, 'create.stamp')) | 520 utils.Touch(os.path.join(SDK, 'create.stamp')) |
| 521 | 521 |
| 522 if __name__ == '__main__': | 522 if __name__ == '__main__': |
| 523 sys.exit(Main(sys.argv)) | 523 sys.exit(Main(sys.argv)) |
| OLD | NEW |