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:])) |