Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 files") | |
| 19 parser.add_option("--output_dir", help="where to copy *py files") | |
| 20 (options, _) = parser.parse_args() | |
|
phoglund
2016/06/03 08:11:07
Nit: remove ( ).
aleloi
2016/06/09 12:00:44
The standings among reviewers are currently 1-1 fo
kwiberg-webrtc
2016/06/09 12:27:20
If it helps resolve the impasse, I can change my +
| |
| 21 | |
| 22 for file_name in os.listdir(options.input_dir): | |
| 23 if file_name.endswith(".py"): | |
| 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() | |
| OLD | NEW |