Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 341 # Create and populate lib/dartdoc. | 341 # Create and populate lib/dartdoc. |
| 342 dartdoc_src_dir = join(HOME, 'lib', 'dartdoc') | 342 dartdoc_src_dir = join(HOME, 'lib', 'dartdoc') |
| 343 dartdoc_dest_dir = join(LIB, 'dartdoc') | 343 dartdoc_dest_dir = join(LIB, 'dartdoc') |
| 344 copytree(dartdoc_src_dir, dartdoc_dest_dir, | 344 copytree(dartdoc_src_dir, dartdoc_dest_dir, |
| 345 ignore=ignore_patterns('.svn', 'docs')) | 345 ignore=ignore_patterns('.svn', 'docs')) |
| 346 | 346 |
| 347 # Fixup dart2js dependencies. | 347 # Fixup dart2js dependencies. |
| 348 ReplaceInFiles([ | 348 ReplaceInFiles([ |
| 349 join(LIB, 'dartdoc', 'dartdoc.dart'), | 349 join(LIB, 'dartdoc', 'dartdoc.dart'), |
| 350 ], [ | 350 ], [ |
| 351 ("scriptDir, '../'", | 351 ("'../..'", |
|
Bill Hesse
2012/07/17 13:42:13
How about replacing
"final String dart2jsDir = '..
Johnni Winther
2012/07/19 08:37:07
Done.
| |
| 352 "scriptDir, '../dart2js/lib/'"), | 352 "'../dart2js/'"), |
| 353 ]) | |
| 354 ReplaceInFiles([ | |
| 355 join(LIB, 'dartdoc', 'dartdoc.dart'), | |
| 356 ], [ | |
| 357 ("scriptDir, '../../'", | |
| 358 "scriptDir, '../dart2js/'"), | |
| 359 ]) | 353 ]) |
| 360 | 354 |
| 361 # Create and populate lib/isolate | 355 # Create and populate lib/isolate |
| 362 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), | 356 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), |
| 363 ignore=ignore_patterns('.svn')) | 357 ignore=ignore_patterns('.svn')) |
| 364 | 358 |
| 365 # | 359 # |
| 366 # Create and populate lib/core. | 360 # Create and populate lib/core. |
| 367 # | 361 # |
| 368 | 362 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 465 if revision is not None: | 459 if revision is not None: |
| 466 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 460 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 467 f.write(revision + '\n') | 461 f.write(revision + '\n') |
| 468 f.close() | 462 f.close() |
| 469 | 463 |
| 470 move(SDK_tmp, SDK) | 464 move(SDK_tmp, SDK) |
| 471 utils.Touch(os.path.join(SDK, 'create.stamp')) | 465 utils.Touch(os.path.join(SDK, 'create.stamp')) |
| 472 | 466 |
| 473 if __name__ == '__main__': | 467 if __name__ == '__main__': |
| 474 sys.exit(Main(sys.argv)) | 468 sys.exit(Main(sys.argv)) |
| OLD | NEW |