Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: tools/create_sdk.py

Issue 10701091: Dartdoc and Apidoc updated to use dart2js through the mirror system. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed cf. rnystrom's comments. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 for filename in os.listdir(src_dir): 337 for filename in os.listdir(src_dir):
338 if filename.endswith('.dart'): 338 if filename.endswith('.dart'):
339 copyfile(join(src_dir, filename), join(dest_dir, filename)) 339 copyfile(join(src_dir, filename), join(dest_dir, filename))
340 340
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 frog dependencies. 347 # Fixup dart2js dependencies.
348 ReplaceInFiles([join(LIB, 'dartdoc', 'dartdoc.dart')], [ 348 ReplaceInFiles([
349 ("'dart2js'", "joinPaths(scriptDir, '../../bin/dart2js')"), 349 join(LIB, 'dartdoc', 'dartdoc.dart'),
350 ], [
351 ("scriptDir, '../'",
352 "scriptDir, '../dart2js/lib/'"),
350 ]) 353 ])
354 ReplaceInFiles([
355 join(LIB, 'dartdoc', 'dartdoc.dart'),
356 ], [
357 ("scriptDir, '../../'",
358 "scriptDir, '../dart2js/'"),
359 ])
360
351 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'frog_options.dart')], [ 361 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'frog_options.dart')], [
352 ("final config = \'dev\';", "final config = \'sdk\';") 362 ("final config = \'dev\';", "final config = \'sdk\';")
353 ]) 363 ])
354 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'lib', 'corelib.dart')], [ 364 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'lib', 'corelib.dart')], [
355 ("../../../../corelib/src/", "../../../core/runtime/") 365 ("../../../../corelib/src/", "../../../core/runtime/")
356 ]); 366 ]);
357 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'lib', 'corelib_impl.dart')], [ 367 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'lib', 'corelib_impl.dart')], [
358 ("../../../../corelib/src/implementation", "../../../coreimpl/runtime/") 368 ("../../../../corelib/src/implementation", "../../../coreimpl/runtime/")
359 ]); 369 ]);
360 370
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 if revision is not None: 475 if revision is not None:
466 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 476 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
467 f.write(revision + '\n') 477 f.write(revision + '\n')
468 f.close() 478 f.close()
469 479
470 move(SDK_tmp, SDK) 480 move(SDK_tmp, SDK)
471 utils.Touch(os.path.join(SDK, 'create.stamp')) 481 utils.Touch(os.path.join(SDK, 'create.stamp'))
472 482
473 if __name__ == '__main__': 483 if __name__ == '__main__':
474 sys.exit(Main(sys.argv)) 484 sys.exit(Main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698