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

Unified Diff: tools/py_event_log_analyzer/copy_files.py

Issue 1999113002: New rtc dump analyzing tool in Python (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changed default to py-3 Created 4 years, 6 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: tools/py_event_log_analyzer/copy_files.py
diff --git a/tools/py_event_log_analyzer/copy_files.py b/tools/py_event_log_analyzer/copy_files.py
new file mode 100644
index 0000000000000000000000000000000000000000..4dba973d1d5d12bc31f45f47a37d99319c1e48e6
--- /dev/null
+++ b/tools/py_event_log_analyzer/copy_files.py
@@ -0,0 +1,32 @@
+# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
kjellander_webrtc 2016/06/13 12:33:31 This script shouldn't be needed if it's only for b
phoglund 2016/06/13 13:40:48 You mean there's a general copy action in gyp?
kjellander_webrtc 2016/06/13 14:13:04 Yes (see my other comment).
+#
+# 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.
+
+"""File copying script for OS compatibility. Used when building."""
+
+import optparse
+import os
+import shutil
+
+
+def main():
+ parser = optparse.OptionParser()
+ parser.add_option("--input_dir", help="directory with *.py and *.sh files")
+ parser.add_option("--output_dir", help="where to copy *.py and *.sh files")
+ (options, _) = parser.parse_args()
+
+ for file_name in os.listdir(options.input_dir):
+ if file_name.endswith(".py") or file_name.endswith(".sh"):
+ copy_file(file_name, options.input_dir, options.output_dir)
+
+
+def copy_file(file_name, path_from, path_to):
+ shutil.copyfile(os.path.join(path_from, file_name),
+ os.path.join(path_to, file_name))
+
+if __name__ == "__main__":
+ main()

Powered by Google App Engine
This is Rietveld 408576698