summaryrefslogtreecommitdiffstats
path: root/tools/export_tarball
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-30 13:58:00 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-30 13:58:00 +0000
commitd5bdb58ac2f1ce6ee48c44b2810aace985795fc8 (patch)
treed6be0bef1a102774252ccbbe9d247d794ec4d8f8 /tools/export_tarball
parentf098a8d611e509daae99e266bafee4b162fe58da (diff)
downloadchromium_src-d5bdb58ac2f1ce6ee48c44b2810aace985795fc8.zip
chromium_src-d5bdb58ac2f1ce6ee48c44b2810aace985795fc8.tar.gz
chromium_src-d5bdb58ac2f1ce6ee48c44b2810aace985795fc8.tar.bz2
Linux: make export_tarball prserve gyp files.
BUG=144823 Review URL: https://codereview.chromium.org/12089047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/export_tarball')
-rwxr-xr-xtools/export_tarball/export_tarball.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/export_tarball/export_tarball.py b/tools/export_tarball/export_tarball.py
index 04b9b3a..518d097 100755
--- a/tools/export_tarball/export_tarball.py
+++ b/tools/export_tarball/export_tarball.py
@@ -94,9 +94,13 @@ class MyTarFile(tarfile.TarFile):
if 'ChangeLog' in name:
return
+ # Remove contents of non-essential directories, but preserve gyp files,
+ # so that build/gyp_chromium can work.
for nonessential_dir in NONESSENTIAL_DIRS:
dir_path = os.path.join(GetSourceDirectory(), nonessential_dir)
- if name.startswith(dir_path):
+ if (name.startswith(dir_path) and
+ os.path.isfile(name) and
+ 'gyp' not in name):
return
tarfile.TarFile.add(self, name, arcname=arcname, recursive=recursive)