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

Side by Side Diff: tools/create_sdk.py

Issue 10861032: Skip .svn files when copying "lib" directories under /pkg (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 415
416 for library in ['args', 'intl', 'logging', 'unittest']: 416 for library in ['args', 'intl', 'logging', 'unittest']:
417 src_dir = join(HOME, 'pkg', library) 417 src_dir = join(HOME, 'pkg', library)
418 dest_dir = join(PKG, library) 418 dest_dir = join(PKG, library)
419 os.makedirs(dest_dir) 419 os.makedirs(dest_dir)
420 420
421 for filename in os.listdir(src_dir): 421 for filename in os.listdir(src_dir):
422 if filename.endswith('.dart'): 422 if filename.endswith('.dart'):
423 copyfile(join(src_dir, filename), join(dest_dir, filename)) 423 copyfile(join(src_dir, filename), join(dest_dir, filename))
424 if exists(join(src_dir, 'lib')): 424 if exists(join(src_dir, 'lib')):
425 copytree(join(src_dir, 'lib'), join(dest_dir, 'lib')) 425 copytree(join(src_dir, 'lib'), join(dest_dir, 'lib'),
426 ignore=ignore_patterns('.svn'))
426 427
427 # Create and populate pkg/dartdoc. 428 # Create and populate pkg/dartdoc.
428 dartdoc_src_dir = join(HOME, 'pkg', 'dartdoc') 429 dartdoc_src_dir = join(HOME, 'pkg', 'dartdoc')
429 dartdoc_dest_dir = join(PKG, 'dartdoc') 430 dartdoc_dest_dir = join(PKG, 'dartdoc')
430 copytree(dartdoc_src_dir, dartdoc_dest_dir, 431 copytree(dartdoc_src_dir, dartdoc_dest_dir,
431 ignore=ignore_patterns('.svn', 'docs')) 432 ignore=ignore_patterns('.svn', 'docs'))
432 433
433 # Fixup dart2js dependencies. 434 # Fixup dart2js dependencies.
434 ReplaceInFiles([ 435 ReplaceInFiles([
435 join(PKG, 'dartdoc', 'dartdoc.dart'), 436 join(PKG, 'dartdoc', 'dartdoc.dart'),
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 if revision is not None: 486 if revision is not None:
486 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 487 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
487 f.write(revision + '\n') 488 f.write(revision + '\n')
488 f.close() 489 f.close()
489 490
490 move(SDK_tmp, SDK) 491 move(SDK_tmp, SDK)
491 utils.Touch(os.path.join(SDK, 'create.stamp')) 492 utils.Touch(os.path.join(SDK, 'create.stamp'))
492 493
493 if __name__ == '__main__': 494 if __name__ == '__main__':
494 sys.exit(Main(sys.argv)) 495 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698