Index: tools/create_sdk.py |
diff --git a/tools/create_sdk.py b/tools/create_sdk.py |
index 4ac8679dfc8428f5fef2f02bbce2d9f86b106a4b..a5340387c0c3009751cfdd6d112e1af6343321c9 100755 |
--- a/tools/create_sdk.py |
+++ b/tools/create_sdk.py |
@@ -1,6 +1,6 @@ |
#!/usr/bin/env python |
# |
-# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+# Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
# for details. All rights reserved. Use of this source code is governed by a |
# BSD-style license that can be found in the LICENSE file. |
# |
@@ -48,19 +48,19 @@ |
# ......(more will come here) |
-import glob |
import optparse |
import os |
import re |
import sys |
import subprocess |
-import tempfile |
+ |
import utils |
+ |
HOST_OS = utils.GuessOS() |
# TODO(dgrove): Only import modules following Google style guide. |
-from os.path import basename, dirname, join, realpath, exists, isdir |
+from os.path import basename, dirname, join, realpath, exists |
# TODO(dgrove): Only import modules following Google style guide. |
from shutil import copyfile, copymode, copytree, ignore_patterns, rmtree, move |
@@ -76,8 +76,8 @@ def GetOptions(): |
def ReplaceInFiles(paths, subs): |
- '''Reads a series of files, applies a series of substitutions to each, and |
- saves them back out. subs should by a list of (pattern, replace) tuples.''' |
+ """Reads a series of files, applies a series of substitutions to each, and |
+ saves them back out. subs should by a list of (pattern, replace) tuples.""" |
for path in paths: |
contents = open(path).read() |
for pattern, replace in subs: |
@@ -94,8 +94,8 @@ def Copy(src, dest): |
def CopyShellScript(src_file, dest_dir): |
- '''Copies a shell/batch script to the given destination directory. Handles |
- using the appropriate platform-specific file extension.''' |
+ """Copies a shell/batch script to the given destination directory. Handles |
+ using the appropriate platform-specific file extension.""" |
file_extension = '' |
if HOST_OS == 'win32': |
file_extension = '.bat' |
@@ -119,7 +119,7 @@ def CopySnapshots(snapshots, sdk_root): |
join(sdk_root, 'bin', 'snapshots', snapshot)) |
-def Main(argv): |
+def Main(): |
# Pull in all of the gypi files which will be munged into the sdk. |
HOME = dirname(dirname(realpath(__file__))) |
@@ -255,4 +255,4 @@ def Main(argv): |
move(SDK_tmp, SDK) |
if __name__ == '__main__': |
- sys.exit(Main(sys.argv)) |
+ sys.exit(Main()) |