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

Side by Side Diff: tools/export_tarball/export_tarball.py

Issue 1545036: Add more directories to export_tarball.py's exclude list. (Closed)
Patch Set: Created 10 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 This tool creates a tarball with all the sources, but without .svn directories. 7 This tool creates a tarball with all the sources, but without .svn directories.
8 8
9 It can also remove files which are not strictly required for build, so that 9 It can also remove files which are not strictly required for build, so that
10 the resulting tarball can be reasonably small (last time it was ~110 MB). 10 the resulting tarball can be reasonably small (last time it was ~110 MB).
11 11
12 Example usage: 12 Example usage:
13 13
14 export_tarball.py /foo/bar 14 export_tarball.py /foo/bar
15 15
16 The above will create file /foo/bar.tar.bz2. 16 The above will create file /foo/bar.tar.bz2.
17 """ 17 """
18 18
19 import optparse 19 import optparse
20 import os 20 import os
21 import sys 21 import sys
22 import tarfile 22 import tarfile
23 23
24 NONESSENTIAL_DIRS = ( 24 NONESSENTIAL_DIRS = (
25 'chrome/test/data', 25 'chrome/test/data',
26 'chrome/tools/test/reference_build', 26 'chrome/tools/test/reference_build',
27 'gears/binaries', 27 'gears/binaries',
28 'native_client/tests',
28 'net/data/cache_tests', 29 'net/data/cache_tests',
30 'src/chrome/test/data',
29 'o3d/documentation', 31 'o3d/documentation',
30 'o3d/samples', 32 'o3d/samples',
31 'third_party/lighttpd', 33 'third_party/lighttpd',
32 'third_party/WebKit/LayoutTests', 34 'third_party/WebKit/LayoutTests',
33 'webkit/data/layout_tests', 35 'webkit/data/layout_tests',
34 'webkit/tools/test/reference_build', 36 'webkit/tools/test/reference_build',
35 ) 37 )
36 38
37 def GetSourceDirectory(): 39 def GetSourceDirectory():
38 return os.path.realpath( 40 return os.path.realpath(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 archive.set_remove_nonessential_files(options.remove_nonessential_files) 83 archive.set_remove_nonessential_files(options.remove_nonessential_files)
82 try: 84 try:
83 archive.add(GetSourceDirectory(), arcname=output_basename) 85 archive.add(GetSourceDirectory(), arcname=output_basename)
84 finally: 86 finally:
85 archive.close() 87 archive.close()
86 88
87 return 0 89 return 0
88 90
89 if __name__ == "__main__": 91 if __name__ == "__main__":
90 sys.exit(main(sys.argv[1:])) 92 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698