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

Unified Diff: tools/export_tarball/export_tarball.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years, 1 month 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
Index: tools/export_tarball/export_tarball.py
diff --git a/tools/export_tarball/export_tarball.py b/tools/export_tarball/export_tarball.py
old mode 100644
new mode 100755
index 97cba10bdecb557fb2ca2f16b41f2cfe5f1078e4..861503eec64991bd88b1f6cfa8f0e84e16babbc1
--- a/tools/export_tarball/export_tarball.py
+++ b/tools/export_tarball/export_tarball.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -22,6 +22,7 @@ import subprocess
import sys
import tarfile
+
NONESSENTIAL_DIRS = (
'chrome/common/extensions/docs',
'chrome/test/data',
@@ -57,10 +58,12 @@ NONESSENTIAL_DIRS = (
'webkit/tools/test/reference_build',
)
+
def GetSourceDirectory():
return os.path.realpath(
os.path.join(os.path.dirname(__file__), '..', '..', '..', 'src'))
+
# Workaround lack of the exclude parameter in add method in python-2.4.
# TODO(phajdan.jr): remove the workaround when it's not needed on the bot.
class MyTarFile(tarfile.TarFile):
@@ -80,6 +83,7 @@ class MyTarFile(tarfile.TarFile):
tarfile.TarFile.add(self, name, arcname=arcname, recursive=recursive)
+
def main(argv):
parser = optparse.OptionParser()
parser.add_option("--remove-nonessential-files",
@@ -109,5 +113,6 @@ def main(argv):
return 0
+
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
« no previous file with comments | « tools/dromaeo_benchmark_runner/dromaeo_benchmark_runner.py ('k') | tools/export_tarball/export_v8_tarball.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698