| Index: tools/export_tarball/export_v8_tarball.py
|
| diff --git a/tools/export_tarball/export_v8_tarball.py b/tools/export_tarball/export_v8_tarball.py
|
| old mode 100644
|
| new mode 100755
|
| index 3119954328394bc6fcefea7dd8f294c3710a7b03..14f8267c6c70632c8d0faa3cee4e5eea38ccefae
|
| --- a/tools/export_tarball/export_v8_tarball.py
|
| +++ b/tools/export_tarball/export_v8_tarball.py
|
| @@ -1,10 +1,9 @@
|
| -#!/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.
|
|
|
| -"""
|
| -This tool creates a tarball with V8 sources, but without .svn directories.
|
| +"""Creates a tarball with V8 sources, but without .svn directories.
|
|
|
| This allows easy packaging of V8, synchronized with browser releases.
|
|
|
| @@ -33,6 +32,7 @@ _V8_PATTERNS = [
|
| _V8_BUILD_NUMBER_PATTERN,
|
| _V8_PATCH_LEVEL_PATTERN]
|
|
|
| +
|
| def GetV8Version(v8_directory):
|
| """
|
| Returns version number as string based on the string
|
| @@ -50,13 +50,16 @@ def GetV8Version(v8_directory):
|
|
|
| return '.'.join(version_components)
|
|
|
| +
|
| def GetSourceDirectory():
|
| return os.path.realpath(
|
| os.path.join(os.path.dirname(__file__), '..', '..', '..', 'src'))
|
|
|
| +
|
| def GetV8Directory():
|
| return os.path.join(GetSourceDirectory(), 'v8')
|
|
|
| +
|
| # 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):
|
| @@ -67,6 +70,7 @@ class MyTarFile(tarfile.TarFile):
|
|
|
| tarfile.TarFile.add(self, name, arcname=arcname, recursive=recursive)
|
|
|
| +
|
| def main(argv):
|
| parser = optparse.OptionParser()
|
| options, args = parser.parse_args(argv)
|
| @@ -99,5 +103,6 @@ def main(argv):
|
|
|
| return 0
|
|
|
| +
|
| if __name__ == '__main__':
|
| sys.exit(main(sys.argv[1:]))
|
|
|