| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 ]) | 270 ]) |
| 271 | 271 |
| 272 version = utils.GetVersion() | 272 version = utils.GetVersion() |
| 273 | 273 |
| 274 # Copy dart2js/dartdoc/pub. | 274 # Copy dart2js/dartdoc/pub. |
| 275 CopyDartScripts(HOME, build_dir, SDK_tmp, version) | 275 CopyDartScripts(HOME, build_dir, SDK_tmp, version) |
| 276 | 276 |
| 277 # Fix up dartdoc. | 277 # Fix up dartdoc. |
| 278 # TODO(dgrove): Remove this once issue 6619 is fixed. | 278 # TODO(dgrove): Remove this once issue 6619 is fixed. |
| 279 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', | 279 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', |
| 280 'bin', 'dartdoc.dart')], | 280 'bin', 'dartdoc.dart')], [ |
| 281 [("../../../../../pkg/args/lib/args.dart", | 281 ("../../../../../pkg/args/lib/args.dart", |
| 282 "../../../../pkg/args/lib/args.dart")]) | 282 "../../../../pkg/args/lib/args.dart"), |
| 283 ("../../../../../pkg/pathos/lib/path.dart", |
| 284 "../../../../pkg/pathos/lib/path.dart"), |
| 285 ]) |
| 283 | 286 |
| 284 # Write the 'version' file | 287 # Write the 'version' file |
| 285 versionFile = open(os.path.join(SDK_tmp, 'version'), 'w') | 288 versionFile = open(os.path.join(SDK_tmp, 'version'), 'w') |
| 286 versionFile.write(version + '\n') | 289 versionFile.write(version + '\n') |
| 287 versionFile.close() | 290 versionFile.close() |
| 288 | 291 |
| 289 # Write the 'revision' file | 292 # Write the 'revision' file |
| 290 revision = utils.GetSVNRevision() | 293 revision = utils.GetSVNRevision() |
| 291 | 294 |
| 292 if revision is not None: | 295 if revision is not None: |
| 293 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 296 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 294 f.write(revision + '\n') | 297 f.write(revision + '\n') |
| 295 f.close() | 298 f.close() |
| 296 | 299 |
| 297 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 300 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 298 | 301 |
| 299 move(SDK_tmp, SDK) | 302 move(SDK_tmp, SDK) |
| 300 | 303 |
| 301 if __name__ == '__main__': | 304 if __name__ == '__main__': |
| 302 sys.exit(Main(sys.argv)) | 305 sys.exit(Main(sys.argv)) |
| OLD | NEW |