 Chromium Code Reviews
 Chromium Code Reviews Issue 1999113002:
  New rtc dump analyzing tool in Python  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@master
    
  
    Issue 1999113002:
  New rtc dump analyzing tool in Python  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@master| 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() |