| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 [(r'..\\..\\sdk\\lib', r'..\lib')]) | 280 [(r'..\\..\\sdk\\lib', r'..\lib')]) |
| 281 else: | 281 else: |
| 282 ReplaceInFiles([join(SDK_tmp, 'bin', 'dart2js'), | 282 ReplaceInFiles([join(SDK_tmp, 'bin', 'dart2js'), |
| 283 join(SDK_tmp, 'bin', 'dartdoc'), | 283 join(SDK_tmp, 'bin', 'dartdoc'), |
| 284 join(SDK_tmp, 'bin', 'pub')], | 284 join(SDK_tmp, 'bin', 'pub')], |
| 285 [('../../sdk/lib', '../lib')]) | 285 [('../../sdk/lib', '../lib')]) |
| 286 | 286 |
| 287 # Fix up dartdoc. | 287 # Fix up dartdoc. |
| 288 # TODO(dgrove): Remove this once sdk and dart-sdk match. | 288 # TODO(dgrove): Remove this once sdk and dart-sdk match. |
| 289 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', | 289 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', |
| 290 'lib', 'dartdoc.dart')], |
| 291 [("_internal/dartdoc/lib/src/client/client", |
| 292 "lib/_internal/dartdoc/lib/src/client/client")]) |
| 293 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', |
| 290 'bin', 'dartdoc.dart')], | 294 'bin', 'dartdoc.dart')], |
| 291 [("../../../../../pkg/args/lib/args.dart", | 295 [("../../../../../pkg/args/lib/args.dart", |
| 292 "../../../../pkg/args/lib/args.dart")]) | 296 "../../../../pkg/args/lib/args.dart")]) |
| 293 | 297 |
| 294 # Write the 'version' file | 298 # Write the 'version' file |
| 295 versionFile = open(os.path.join(SDK_tmp, 'version'), 'w') | 299 versionFile = open(os.path.join(SDK_tmp, 'version'), 'w') |
| 296 versionFile.write(version + '\n') | 300 versionFile.write(version + '\n') |
| 297 versionFile.close() | 301 versionFile.close() |
| 298 | 302 |
| 299 # Write the 'revision' file | 303 # Write the 'revision' file |
| 300 revision = utils.GetSVNRevision() | 304 revision = utils.GetSVNRevision() |
| 301 | 305 |
| 302 if revision is not None: | 306 if revision is not None: |
| 303 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 307 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 304 f.write(revision + '\n') | 308 f.write(revision + '\n') |
| 305 f.close() | 309 f.close() |
| 306 | 310 |
| 307 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 311 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 308 | 312 |
| 309 move(SDK_tmp, SDK) | 313 move(SDK_tmp, SDK) |
| 310 | 314 |
| 311 if __name__ == '__main__': | 315 if __name__ == '__main__': |
| 312 sys.exit(Main(sys.argv)) | 316 sys.exit(Main(sys.argv)) |
| OLD | NEW |