Index: third_party/widevine/cdm/copy_with_rename.py |
diff --git a/third_party/widevine/cdm/copy_with_rename.py b/third_party/widevine/cdm/copy_with_rename.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..3ffe8d0d4b1abb8f4da50e74b8cf6c153b34637b |
--- /dev/null |
+++ b/third_party/widevine/cdm/copy_with_rename.py |
@@ -0,0 +1,35 @@ |
+#!/usr/bin/env python |
+# Copyright 2015 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import shutil |
+import sys |
+ |
+def usage(): |
+ print """\nUsage: %s <input_files> <output_files> |
+ |
+ Copies 1 or 2 <input_files> to matching <output_files> |
+ |
+ Examples: |
+ Copy 1 file: |
+ ./copy_with_rename.py in out |
+ Copy 2 files: |
+ ./copy_with_rename.py in1 in2 out1 out2 |
+ """ % sys.argv[0] |
+ sys.exit(1) |
+ |
+ |
+def Main(argv): |
+ if len(argv) == 3: |
+ shutil.copyfile(argv[1], argv[2]) |
+ elif len(argv) == 5: |
+ shutil.copyfile(argv[1], argv[3]) |
+ shutil.copyfile(argv[2], argv[4]) |
+ else: |
+ usage() |
+ return 0 |
+ |
+ |
+if __name__ == '__main__': |
+ sys.exit(Main(sys.argv)) |