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

Side by Side Diff: bin/sync-and-gyp

Issue 1708563002: come on, this is how you drive-by (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright 2015 Google Inc. 3 # Copyright 2015 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 # This script will update Skia's dependencies as necessary and run 8 # This script will update Skia's dependencies as necessary and run
9 # gyp if needed. 9 # gyp if needed.
10 10
11 # Depends on: Python, Git, and depot_tools. 11 # Depends on: Python, Git, and depot_tools.
12 # 12 #
13 # Example usage: 13 # Example usage:
14 # 14 #
15 # git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git 15 # git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
16 # export PATH="${PWD}/depot_tools:${PATH}" 16 # export PATH="${PWD}/depot_tools:${PATH}"
17 # git clone https://skia.googlesource.com/skia 17 # git clone https://skia.googlesource.com/skia
18 # cd skia 18 # cd skia
19 # python bin/sync-and-gyp 19 # python bin/sync-and-gyp
20 # ninja -C out/Debug && out/Debug/dm 20 # ninja -C out/Debug && out/Debug/dm
21 # 21 #
22 # Once changes are made to DEPS or gyp/ or the source, call: 22 # Once changes are made to DEPS or gyp/ or the source, call:
23 # 23 #
24 # python bin/sync-and-gyp 24 # python bin/sync-and-gyp
25 25
26 import fnmatch 26 import fnmatch
27 import hashlib 27 import hashlib
28 import subprocess 28 import subprocess
29 import os 29 import os
30 import sys
30 31
31 skia_dir = os.path.join(os.path.dirname(__file__), os.pardir) 32 skia_dir = os.path.join(os.path.dirname(__file__), os.pardir)
32 33
33 skia_out = os.environ.get("SKIA_OUT") 34 skia_out = os.environ.get("SKIA_OUT")
34 if skia_out: 35 if skia_out:
35 skia_out = os.path.abspath(skia_out) 36 skia_out = os.path.abspath(skia_out)
36 hash_path = os.path.join(skia_out, 'gyp_hash') 37 hash_path = os.path.join(skia_out, 'gyp_hash')
37 else: 38 else:
38 hash_path = os.path.join('out', 'gyp_hash') 39 hash_path = os.path.join('out', 'gyp_hash')
39 40
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return f.read() 115 return f.read()
115 return '' 116 return ''
116 117
117 if cat_if_exists(hash_path).strip() != gyp_hash: 118 if cat_if_exists(hash_path).strip() != gyp_hash:
118 env = os.environ.copy() 119 env = os.environ.copy()
119 if skia_out: 120 if skia_out:
120 env['SKIA_OUT'] = skia_out 121 env['SKIA_OUT'] = skia_out
121 subprocess.call(['python', './gyp_skia'], env=env) 122 subprocess.call(['python', './gyp_skia'], env=env)
122 with open(hash_path, 'w') as o: 123 with open(hash_path, 'w') as o:
123 o.write(gyp_hash) 124 o.write(gyp_hash)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698