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

Side by Side Diff: copy_obj.py

Issue 757313004: Remove all remaining obj_int_extract code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « README.chromium ('k') | generate_gypi.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
2 #
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
5 # found in the LICENSE file.
6
7 """This script is used to find and copy a file that may be found in one or more
8 places. The sources are searched in order and (only) the first one found will
9 be copied to the destination."""
10
11 import shutil
12 import optparse
13 import os
14 import sys
15
16 parser = optparse.OptionParser()
17 parser.description = __doc__
18 parser.add_option('-d', '--destination')
19 parser.add_option('-s', '--source', default=[], action='append',
20 help='Specify multiple times for multiple sources.')
21 options, args = parser.parse_args()
22 if (not options.destination or not options.source):
23 parser.error('Must specify both a destination and one or more sources.')
24 sys.exit(1)
25
26 for src in options.source:
27 if os.path.exists(src):
28 shutil.copyfile(src, options.destination)
29 sys.exit(0)
30
31 print "Unable to locate file"
32 sys.exit(1)
OLDNEW
« no previous file with comments | « README.chromium ('k') | generate_gypi.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698