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

Side by Side Diff: build/linux/sysroot_scripts/install-sysroot.py

Issue 2059143002: "up-to-date" should only use hyphens when used as compound modifier of a noun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 | « build/linux/install-chromeos-fonts.py ('k') | cc/animation/element_animations.cc » ('j') | 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 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Install Debian Wheezy sysroots for building chromium. 6 """Install Debian Wheezy sysroots for building chromium.
7 """ 7 """
8 8
9 # The sysroot is needed to ensure that binaries will run on Debian Wheezy, 9 # The sysroot is needed to ensure that binaries will run on Debian Wheezy,
10 # the oldest supported linux distribution. This script can be run manually but 10 # the oldest supported linux distribution. This script can be run manually but
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 revision = REVISION_MIPS 182 revision = REVISION_MIPS
183 else: 183 else:
184 raise Error('Unknown architecture: %s' % target_arch) 184 raise Error('Unknown architecture: %s' % target_arch)
185 185
186 url = '%s/%s/%s/%s' % (URL_PREFIX, URL_PATH, revision, tarball_filename) 186 url = '%s/%s/%s/%s' % (URL_PREFIX, URL_PATH, revision, tarball_filename)
187 187
188 stamp = os.path.join(sysroot, '.stamp') 188 stamp = os.path.join(sysroot, '.stamp')
189 if os.path.exists(stamp): 189 if os.path.exists(stamp):
190 with open(stamp) as s: 190 with open(stamp) as s:
191 if s.read() == url: 191 if s.read() == url:
192 print 'Debian Wheezy %s root image already up-to-date: %s' % \ 192 print 'Debian Wheezy %s root image already up to date: %s' % \
193 (target_arch, sysroot) 193 (target_arch, sysroot)
194 return 194 return
195 195
196 print 'Installing Debian Wheezy %s root image: %s' % (target_arch, sysroot) 196 print 'Installing Debian Wheezy %s root image: %s' % (target_arch, sysroot)
197 if os.path.isdir(sysroot): 197 if os.path.isdir(sysroot):
198 shutil.rmtree(sysroot) 198 shutil.rmtree(sysroot)
199 os.mkdir(sysroot) 199 os.mkdir(sysroot)
200 tarball = os.path.join(sysroot, tarball_filename) 200 tarball = os.path.join(sysroot, tarball_filename)
201 print 'Downloading %s' % url 201 print 'Downloading %s' % url
202 sys.stdout.flush() 202 sys.stdout.flush()
(...skipping 10 matching lines...) Expand all
213 with open(stamp, 'w') as s: 213 with open(stamp, 'w') as s:
214 s.write(url) 214 s.write(url)
215 215
216 216
217 if __name__ == '__main__': 217 if __name__ == '__main__':
218 try: 218 try:
219 sys.exit(main(sys.argv[1:])) 219 sys.exit(main(sys.argv[1:]))
220 except Error as e: 220 except Error as e:
221 sys.stderr.write(str(e) + '\n') 221 sys.stderr.write(str(e) + '\n')
222 sys.exit(1) 222 sys.exit(1)
OLDNEW
« no previous file with comments | « build/linux/install-chromeos-fonts.py ('k') | cc/animation/element_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698