| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 subprocess | 21 import subprocess |
| 22 import sys | 22 import sys |
| 23 import tarfile | 23 import tarfile |
| 24 | 24 |
| 25 | 25 |
| 26 NONESSENTIAL_DIRS = ( | 26 NONESSENTIAL_DIRS = ( |
| 27 'breakpad/src/processor/testdata', | 27 'breakpad/src/processor/testdata', |
| 28 'chrome/browser/resources/tracing/tests', | 28 'chrome/browser/resources/tracing/tests', |
| 29 'chrome/common/extensions/docs', | 29 'chrome/common/extensions/docs', |
| 30 'chrome/tools/test/reference_build', | |
| 31 'courgette/testdata', | 30 'courgette/testdata', |
| 32 'data', | 31 'data', |
| 33 'native_client/src/trusted/service_runtime/testdata', | 32 'native_client/src/trusted/service_runtime/testdata', |
| 34 'src/chrome/test/data', | 33 'src/chrome/test/data', |
| 35 'o3d/documentation', | 34 'o3d/documentation', |
| 36 'o3d/samples', | 35 'o3d/samples', |
| 37 'o3d/tests', | 36 'o3d/tests', |
| 38 'ppapi/examples', | 37 'ppapi/examples', |
| 39 'ppapi/native_client/tests', | 38 'ppapi/native_client/tests', |
| 40 'third_party/angle/samples/gles2_book', | 39 'third_party/angle/samples/gles2_book', |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 188 |
| 190 if rc != 0: | 189 if rc != 0: |
| 191 print 'xz -9 failed!' | 190 print 'xz -9 failed!' |
| 192 return 1 | 191 return 1 |
| 193 | 192 |
| 194 return 0 | 193 return 0 |
| 195 | 194 |
| 196 | 195 |
| 197 if __name__ == "__main__": | 196 if __name__ == "__main__": |
| 198 sys.exit(main(sys.argv[1:])) | 197 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |