| Index: webrtc/build/ios/flatten_ios_headers.py
|
| diff --git a/webrtc/build/ios/flatten_ios_headers.py b/webrtc/build/ios/flatten_ios_headers.py
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..da7df96a1546aeba16b23a00da39203c9786012a
|
| --- /dev/null
|
| +++ b/webrtc/build/ios/flatten_ios_headers.py
|
| @@ -0,0 +1,41 @@
|
| +#!/usr/bin/python
|
| +
|
| +# Copyright 2016 The WebRTC project authors. All Rights Reserved.
|
| +#
|
| +# Use of this source code is governed by a BSD-style license
|
| +# that can be found in the LICENSE file in the root of the source
|
| +# tree. An additional intellectual property rights grant can be found
|
| +# in the file PATENTS. All contributing project authors may
|
| +# be found in the AUTHORS file in the root of the source tree.
|
| +
|
| +"""Script for flattening iOS header structure."""
|
| +
|
| +import os
|
| +import shutil
|
| +import sys
|
| +
|
| +def FlattenHeaders():
|
| + """Flattens iOS header file directory structure."""
|
| + lib_base_dir = 'out_ios_libs'
|
| + framework_base_dir = 'out_ios_framework'
|
| + include_dir = 'include'
|
| + unflattened_include_dir_path = os.path.join(lib_base_dir, include_dir)
|
| + flattened_include_dir_path = os.path.join(framework_base_dir, include_dir)
|
| +
|
| + # Create output directories.
|
| + if not os.path.exists(framework_base_dir):
|
| + os.mkdir(framework_base_dir)
|
| + if not os.path.exists(flattened_include_dir_path):
|
| + os.mkdir(flattened_include_dir_path)
|
| +
|
| + for dirpath, _, filenames in os.walk(unflattened_include_dir_path):
|
| + for filename in filenames:
|
| + current_path = os.path.join(dirpath, filename)
|
| + new_path = os.path.join(flattened_include_dir_path, filename)
|
| + shutil.copy(current_path, new_path)
|
| +
|
| +def Main():
|
| + FlattenHeaders()
|
| +
|
| +if __name__ == '__main__':
|
| + sys.exit(Main())
|
|
|