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

Unified Diff: webrtc/build/ios/flatten_ios_headers.py

Issue 1875003004: Fix WebRTC API framework build. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Update scripts Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/build/ios/flatten_ios_headers.py
diff --git a/webrtc/build/ios/flatten_ios_headers b/webrtc/build/ios/flatten_ios_headers.py
similarity index 59%
rename from webrtc/build/ios/flatten_ios_headers
rename to webrtc/build/ios/flatten_ios_headers.py
index 67c06acc91ac731d0257dc88546145e862aef097..f87c7ed4e124a4e9c37e7359d7deccd89c9a0579 100755
--- a/webrtc/build/ios/flatten_ios_headers
+++ b/webrtc/build/ios/flatten_ios_headers.py
@@ -15,22 +15,16 @@ import os
import shutil
import sys
-def FlattenHeaders(lib_base_dir, framework_base_dir):
+def FlattenHeaders(input_dir, output_dir):
kjellander_webrtc 2016/04/15 04:59:41 nit: +1 blank line before top-level definition htt
tkchin_webrtc 2016/04/16 00:34:19 Done.
"""Flattens iOS header file directory structure."""
- 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)
+ if not os.path.exists(output_dir):
+ os.mkdir(output_dir)
- for dirpath, _, filenames in os.walk(unflattened_include_dir_path):
+ for dirpath, _, filenames in os.walk(input_dir):
for filename in filenames:
current_path = os.path.join(dirpath, filename)
- new_path = os.path.join(flattened_include_dir_path, filename)
+ new_path = os.path.join(output_dir, filename)
shutil.copy(current_path, new_path)
def Main():
@@ -38,9 +32,9 @@ def Main():
_, args = parser.parse_args()
if len(args) != 2:
parser.error('Error: Exactly 2 arguments required.')
kjellander_webrtc 2016/04/15 04:59:41 Output a usage line as well?
tkchin_webrtc 2016/04/16 00:34:19 Used argparse everywhere to get free usage and che
- lib_base_dir = args[0]
- framework_base_dir = args[1]
- FlattenHeaders(lib_base_dir, framework_base_dir)
+ input_dir = args[0]
+ output_dir = args[1]
+ FlattenHeaders(input_dir, output_dir)
if __name__ == '__main__':
sys.exit(Main())

Powered by Google App Engine
This is Rietveld 408576698