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..239678d85d92b4fe9c1b3931eb4daca6a7eae725 |
--- /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. |
+# |
+# 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") |
kwiberg-webrtc
2016/06/09 12:27:20
*.py and *.sh would be better. But it looks like t
aleloi
2016/06/10 14:12:03
Done.
|
+ (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() |