Home | History | Annotate | Download | only in tools

Lines Matching refs:local_path

252     local_path = os.path.join(ROOT_DIR, rel_path)
254 CheckoutGitRepo(local_path, url, expected_sha1)
256 is_zip = local_path.endswith('.zip') or local_path.endswith('.tgz')
257 zip_target_dir = local_path[:-4] if is_zip else None
260 if ((not is_zip and HashLocalFile(local_path) == expected_sha1) or
264 if HashLocalFile(local_path) != expected_sha1:
265 download_path = local_path + '.tmp'
266 logging.info('Downloading %s from %s', local_path, url)
273 os.rename(download_path, local_path)
274 assert(HashLocalFile(local_path) == expected_sha1)
277 logging.info('Extracting %s into %s' % (local_path, zip_target_dir))
284 if local_path.endswith('.tgz'):
286 subprocess.check_call(['tar', '-zxf', local_path], cwd=zip_target_dir)
287 elif local_path.endswith('.zip'):
288 with zipfile.ZipFile(local_path, 'r') as zf:
305 os.remove(local_path)