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

Side by Side Diff: third_party/libvpx/run_perl.py

Issue 1734613003: Move libvpx_new to libvpx (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright 2014 The Chromium Authors. All rights reserved. 3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 "This script is used to run a perl script." 7 "This script is used to run a perl script."
8 8
9 import optparse 9 import optparse
10 import subprocess 10 import subprocess
11 import sys 11 import sys
12 12
13 parser = optparse.OptionParser() 13 parser = optparse.OptionParser()
14 parser.description = __doc__ 14 parser.description = __doc__
15 parser.add_option('-s', '--script', help='path to a perl script.') 15 parser.add_option('-s', '--script', help='path to a perl script.')
16 parser.add_option('-i', '--input', help='file passed to stdin.') 16 parser.add_option('-i', '--input', help='file passed to stdin.')
17 parser.add_option('-o', '--output', help='file saved from stdout.') 17 parser.add_option('-o', '--output', help='file saved from stdout.')
18 18
19 19
20 options, args = parser.parse_args() 20 options, args = parser.parse_args()
21 if (not options.script or not options.input or not options.output): 21 if (not options.script or not options.input or not options.output):
22 parser.error('Must specify arguments for script, input and output.') 22 parser.error('Must specify arguments for script, input and output.')
23 sys.exit(1) 23 sys.exit(1)
24 24
25 with open(options.output, 'w') as fo, open(options.input, 'r') as fi: 25 with open(options.output, 'w') as fo, open(options.input, 'r') as fi:
26 subprocess.check_call(['perl', options.script], stdout=fo, stdin=fi) 26 subprocess.check_call(['perl', options.script], stdout=fo, stdin=fi)
27 27
28 sys.exit(0) 28 sys.exit(0)
OLDNEW
« no previous file with comments | « third_party/libvpx/lint_config.sh ('k') | third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698