OLD | NEW |
(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()) |
OLD | NEW |