blob: 8398e5171648e10c668d852b62fd8ba1b8cb77ad [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/usr/bin/env python
2# Copyright 2016 the V8 project authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6import os
7import tarfile
8
9os.chdir(os.path.dirname(os.path.abspath(__file__)))
10
11def filter_git(tar_info):
12 if tar_info.name.startswith(os.path.join('data', '.git')):
13 return None
14 else:
15 return tar_info
16
17with tarfile.open('data.tar', 'w') as tar:
18 tar.add('data', filter=filter_git)