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

Side by Side Diff: tools/create_sdk.py

Issue 628363002: Modify dartanalyzer scripts to look more like dart2js scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address code review comments and rebase Created 6 years, 2 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 dest_file = basename(src_file) 105 dest_file = basename(src_file)
106 if dest_file.endswith('_sdk'): 106 if dest_file.endswith('_sdk'):
107 dest_file = dest_file.replace('_sdk', '') 107 dest_file = dest_file.replace('_sdk', '')
108 108
109 src = src_file + file_extension 109 src = src_file + file_extension
110 dest = join(dest_dir, dest_file + file_extension) 110 dest = join(dest_dir, dest_file + file_extension)
111 Copy(src, dest) 111 Copy(src, dest)
112 112
113 113
114 def CopyDartScripts(home, sdk_root): 114 def CopyDartScripts(home, sdk_root):
115 for executable in ['dart2js', 'dartanalyzer', 'dartfmt', 'docgen', 'pub_sdk']: 115 for executable in ['dart2js', 'dartanalyzer_sdk', 'dartfmt', 'docgen',
116 'pub_sdk']:
116 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable), 117 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable),
117 os.path.join(sdk_root, 'bin')) 118 os.path.join(sdk_root, 'bin'))
118 119
119 120
120 def CopySnapshots(snapshots, sdk_root): 121 def CopySnapshots(snapshots, sdk_root):
121 for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt', 122 for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt',
122 'utils_wrapper', 'pub']: 123 'utils_wrapper', 'pub']:
123 snapshot += '.dart.snapshot' 124 snapshot += '.dart.snapshot'
124 copyfile(join(snapshots, snapshot), 125 copyfile(join(snapshots, snapshot),
125 join(sdk_root, 'bin', 'snapshots', snapshot)) 126 join(sdk_root, 'bin', 'snapshots', snapshot))
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 258 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
258 f.write(revision + '\n') 259 f.write(revision + '\n')
259 f.close() 260 f.close()
260 261
261 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) 262 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README'))
262 263
263 move(SDK_tmp, SDK) 264 move(SDK_tmp, SDK)
264 265
265 if __name__ == '__main__': 266 if __name__ == '__main__':
266 sys.exit(Main()) 267 sys.exit(Main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698