blob: 7183d28f3488b37736777b87aef640dbf91fbb8c [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/usr/bin/env python
2# Copyright 2016 the V8 project authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6import os
7import re
8import subprocess
9
10GCMOLE_PATH = os.path.dirname(os.path.abspath(__file__))
11SHA1_PATH = os.path.join(GCMOLE_PATH, 'gcmole-tools.tar.gz.sha1')
12
13if re.search(r'\bgcmole=1', os.environ.get('GYP_DEFINES', '')):
14 subprocess.check_call([
15 'download_from_google_storage',
16 '-b', 'chrome-v8-gcmole',
17 '-u', '--no_resume',
18 '-s', SHA1_PATH,
19 '--platform=linux*'
20 ])
21else:
22 print 'Skipping gcmole download as gcmole is not set in gyp flags.'