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

Side by Side Diff: tools/create_sdk.py

Issue 8820017: The last change to create_sdk.py failed if the 'sdk' dir already existed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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) 2011, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2011, 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. The SDK will be 7 # A script which will be invoked from gyp to create an SDK. The SDK will be
8 # used either from the command-line or from the editor. Top structure is 8 # used either from the command-line or from the editor. Top structure is
9 # 9 #
10 # ..sdk/ 10 # ..sdk/
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 (eval(open("frog/lib/frog_json_sources.gypi").read()))['sources'] 74 (eval(open("frog/lib/frog_json_sources.gypi").read()))['sources']
75 75
76 HOME = dirname(dirname(realpath(__file__))) 76 HOME = dirname(dirname(realpath(__file__)))
77 77
78 SDK = argv[1] 78 SDK = argv[1]
79 79
80 # TODO(dgrove) - deal with architectures that are not ia32. 80 # TODO(dgrove) - deal with architectures that are not ia32.
81 if (os.path.basename(os.path.dirname(SDK)) != 81 if (os.path.basename(os.path.dirname(SDK)) !=
82 utils.GetBuildConf('release', 'ia32')): 82 utils.GetBuildConf('release', 'ia32')):
83 print "SDK is not built in Debug mode." 83 print "SDK is not built in Debug mode."
84 # leave empty dir behind 84 if not os.path.exists(SDK):
85 os.makedirs(SDK) 85 # leave empty dir behind
86 os.makedirs(SDK)
86 exit(0) 87 exit(0)
87 88
88 if exists(SDK): 89 if exists(SDK):
89 rmtree(SDK) 90 rmtree(SDK)
90 91
91 # Create and populate sdk/bin. 92 # Create and populate sdk/bin.
92 BIN = join(SDK, 'bin') 93 BIN = join(SDK, 'bin')
93 os.makedirs(BIN) 94 os.makedirs(BIN)
94 95
95 # Copy the Dart VM binary into sdk/bin. 96 # Copy the Dart VM binary into sdk/bin.
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 # Create and copy tools. 352 # Create and copy tools.
352 353
353 UTIL = join(SDK, 'tools') 354 UTIL = join(SDK, 'tools')
354 os.makedirs(UTIL) 355 os.makedirs(UTIL)
355 356
356 copytree(join(HOME, 'utils', 'dartdoc'), join(UTIL, 'dartdoc'), 357 copytree(join(HOME, 'utils', 'dartdoc'), join(UTIL, 'dartdoc'),
357 ignore=ignore_patterns('.svn')) 358 ignore=ignore_patterns('.svn'))
358 359
359 if __name__ == '__main__': 360 if __name__ == '__main__':
360 sys.exit(Main(sys.argv)) 361 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