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

Unified Diff: tools/copy_dart.py

Issue 350483003: Build Tools Cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more fixes as reviewed by ricow Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/compiler_scripts/generate_source_list.py ('k') | tools/create_debian_packages.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tools/compiler_scripts/generate_source_list.py ('k') | tools/create_debian_packages.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698