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

Side by Side Diff: webrtc/build/ios/flatten_ios_headers.py

Issue 1903663002: Build dynamic iOS SDK. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix test gyp Created 4 years, 7 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 | « webrtc/build/ios/export_headers.py ('k') | webrtc/build/ios/merge_ios_libs.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
2
3 # Copyright 2016 The WebRTC project authors. All Rights Reserved.
4 #
5 # Use of this source code is governed by a BSD-style license
6 # that can be found in the LICENSE file in the root of the source
7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree.
10
11 """Script for flattening iOS header structure."""
12
13 import sys
14
15 import argparse
16 import os
17 import shutil
18
19
20 def FlattenHeaders(input_dir, output_dir):
21 """Flattens iOS header file directory structure."""
22 # Create output directories.
23 if not os.path.exists(output_dir):
24 os.mkdir(output_dir)
25
26 for dirpath, _, filenames in os.walk(input_dir):
27 for filename in filenames:
28 current_path = os.path.join(dirpath, filename)
29 new_path = os.path.join(output_dir, filename)
30 shutil.copy(current_path, new_path)
31
32
33 def Main():
34 parser_description = 'Flatten WebRTC ObjC API headers.'
35 parser = argparse.ArgumentParser(description=parser_description)
36 parser.add_argument('input_dir',
37 help='Output directory to write headers to.',
38 type=str)
39 parser.add_argument('output_dir',
40 help='Input directory to read headers from.',
41 type=str)
42 args = parser.parse_args()
43 input_dir = args.input_dir
44 output_dir = args.output_dir
45 FlattenHeaders(input_dir, output_dir)
46
47
48 if __name__ == '__main__':
49 sys.exit(Main())
OLDNEW
« no previous file with comments | « webrtc/build/ios/export_headers.py ('k') | webrtc/build/ios/merge_ios_libs.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698