diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install-buildtools | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/install-buildtools b/scripts/install-buildtools index 6287416c9a..952da888ba 100755 --- a/scripts/install-buildtools +++ b/scripts/install-buildtools | |||
@@ -244,6 +244,8 @@ def main(): | |||
244 | # Fetch installer | 244 | # Fetch installer |
245 | logger.info("Fetching buildtools installer") | 245 | logger.info("Fetching buildtools installer") |
246 | tmpbuildtools = os.path.join(sdk_dir, filename) | 246 | tmpbuildtools = os.path.join(sdk_dir, filename) |
247 | with open(os.path.join(sdk_dir, 'buildtools_url'), 'w') as f: | ||
248 | f.write(buildtools_url) | ||
247 | ret = subprocess.call("wget -q -O %s %s" % | 249 | ret = subprocess.call("wget -q -O %s %s" % |
248 | (tmpbuildtools, buildtools_url), shell=True) | 250 | (tmpbuildtools, buildtools_url), shell=True) |
249 | if ret != 0: | 251 | if ret != 0: |
@@ -254,13 +256,15 @@ def main(): | |||
254 | if args.check: | 256 | if args.check: |
255 | logger.info("Fetching buildtools installer checksum") | 257 | logger.info("Fetching buildtools installer checksum") |
256 | checksum_type = "sha256sum" | 258 | checksum_type = "sha256sum" |
257 | check_url = "{}.{}".format(buildtools_url, checksum_type) | 259 | checksum_url = "{}.{}".format(buildtools_url, checksum_type) |
258 | checksum_filename = "{}.{}".format(filename, checksum_type) | 260 | checksum_filename = "{}.{}".format(filename, checksum_type) |
259 | tmpbuildtools_checksum = os.path.join(sdk_dir, checksum_filename) | 261 | tmpbuildtools_checksum = os.path.join(sdk_dir, checksum_filename) |
262 | with open(os.path.join(sdk_dir, 'checksum_url'), 'w') as f: | ||
263 | f.write(checksum_url) | ||
260 | ret = subprocess.call("wget -q -O %s %s" % | 264 | ret = subprocess.call("wget -q -O %s %s" % |
261 | (tmpbuildtools_checksum, check_url), shell=True) | 265 | (tmpbuildtools_checksum, checksum_url), shell=True) |
262 | if ret != 0: | 266 | if ret != 0: |
263 | logger.error("Could not download file from %s" % check_url) | 267 | logger.error("Could not download file from %s" % checksum_url) |
264 | return ret | 268 | return ret |
265 | regex = re.compile(r"^(?P<checksum>[0-9a-f]+)\s+(?P<path>.*/)?(?P<filename>.*)$") | 269 | regex = re.compile(r"^(?P<checksum>[0-9a-f]+)\s+(?P<path>.*/)?(?P<filename>.*)$") |
266 | with open(tmpbuildtools_checksum, 'rb') as f: | 270 | with open(tmpbuildtools_checksum, 'rb') as f: |