Index: tools/copy_dart.py |
diff --git a/tools/copy_dart.py b/tools/copy_dart.py |
index 6bd57256e18c302330cbbdf6549fb31cb56769d3..f7d513ad1f08f76751bc63ecfe911ee5801ccee1 100755 |
--- a/tools/copy_dart.py |
+++ b/tools/copy_dart.py |
@@ -1,15 +1,14 @@ |
#!/usr/bin/env python |
-# Copyright (c) 2011, 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. |
"""Used to merge and copy dart source files for deployment to AppEngine""" |
import fileinput |
import sys |
-import shutil |
import os |
import re |
-from os.path import abspath, basename, dirname, exists, isabs, join |
+from os.path import basename, dirname, exists, isabs, join |
from glob import glob |
re_directive = re.compile( |
@@ -76,7 +75,7 @@ def mergefiles(srcs, dstfile): |
def main(outdir = None, *inputs): |
if not outdir or not inputs: |
- print "Usage: %s OUTDIR INPUTS" % args[0] |
+ print "Usage: %s OUTDIR INPUTS" % sys.argv[0] |
print " OUTDIR is the war directory to copy to" |
print " INPUTS is a list of files or patterns used to specify the input" |
print " .dart files" |
@@ -124,7 +123,7 @@ def main(outdir = None, *inputs): |
else: |
f.write("library %s;\n\n" % basename(lib)) |
for importfile in library.imports: |
- f.write("import %s;\n" % (importfile)) |
+ f.write("import %s;\n" % importfile) |
f.write('%s' % (''.join(library.code))) |
mergefiles([normjoin(dirname(lib), s) for s in library.sources], f) |
@@ -132,7 +131,7 @@ def main(outdir = None, *inputs): |
m = re.match(r'[\'"]([^\'"]+)[\'"](\s+as\s+\w+)?.*$', suffix) |
uri = m.group(1) |
if not uri.startswith('dart:'): |
- worklist.append(normjoin(dirname(lib), uri)); |
+ worklist.append(normjoin(dirname(lib), uri)) |
return 0 |