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

Side by Side 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: Formatting, licence and usage string. 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2 #
3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree.
8
9 """File copying script for OS compatibility. Used when building."""
10
11 import optparse
12 import os
13 import shutil
14
15
16 def main():
17 parser = optparse.OptionParser()
18 parser.add_option("--input_dir", help="directory with *py and *sh files")
19 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.
20 (options, _) = parser.parse_args()
21
22 for file_name in os.listdir(options.input_dir):
23 if file_name.endswith(".py") or file_name.endswith(".sh"):
24 copy_file(file_name, options.input_dir, options.output_dir)
25
26
27 def copy_file(file_name, path_from, path_to):
28 shutil.copyfile(os.path.join(path_from, file_name),
29 os.path.join(path_to, file_name))
30
31 if __name__ == "__main__":
32 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698