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

Side by Side Diff: webkit/compositor/copyfiles.py

Issue 10828381: libcc and webkit_compositor targets + stubs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Slightly better scripts and updated README Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import shutil
6 import os
7
8 prefixes = ["../../third_party/WebKit/Source/WebCore/platform/chromium/support",
9 "../../third_party/WebKit/Source/WebKit/chromium/src",
10 "../../third_party/WebKit/Source/WebCore/platform"]
11
12 def Copy(name):
13 src = name
14 dst = name
15 fullsrc = ""
16 for prefix in prefixes:
17 candidate = "%s/%s" % (prefix, src)
18 if os.path.exists(candidate):
19 fullsrc = candidate
20 break
21 if fullsrc == "":
22 print "could not find %s to copy" % name
23 return
24 shutil.copyfile(fullsrc, dst)
25 print "copying from %s to %s" % (fullsrc, dst)
26
27 def Readfile(gypfile):
28 cc_gyp = open(gypfile, "r")
29 obj = eval(cc_gyp.read())
30 cc_gyp.close()
31 return obj
32
33 def Main():
34 files = Readfile("compositor.gyp")['variables']['webkit_compositor_sources']
35 for f in files:
36 Copy(f)
37
38 if __name__ == '__main__':
39 import sys
40 os.chdir(os.path.dirname(__file__))
41 sys.exit(Main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698