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

Unified Diff: third_party/widevine/cdm/copy_with_rename.py

Issue 1043673002: Allow widevinecdmadapter to be built in Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
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..9afa6f58b7a5550445df1ab4634f6457d8d2121d
--- /dev/null
+++ b/third_party/widevine/cdm/copy_with_rename.py
@@ -0,0 +1,34 @@
+#!/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 os
xhwang 2015/04/02 18:51:52 not used?
jrummell 2015/04/02 23:47:55 Done.
+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)
+
xhwang 2015/04/02 18:51:52 two empty lines per style guide
jrummell 2015/04/02 23:47:55 Done.
+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
+
xhwang 2015/04/02 18:51:52 ditto
jrummell 2015/04/02 23:47:55 Done.
+if __name__ == '__main__':
+ sys.exit(Main(sys.argv))

Powered by Google App Engine
This is Rietveld 408576698