| from shutil import copyfile |
| for root, dirnames, filenames in os.walk('bazel-bin\\java\\org\\brotli'): |
| for filename in fnmatch.filter(filenames, '*.runfiles_manifest'): |
| matches.append(os.path.join(root, filename)) |
| runfiles = match[:-len('_manifest')] |
| with open(match) as manifest: |
| if not entry.startswith("org_brotli"): |
| if entry.startswith('org_brotli/external'): |
| (alias, space, link) = entry.partition(' ') |
| if alias.endswith('.jar') or alias.endswith('.exe'): |
| link = link.replace('/', '\\') |
| alias = alias.replace('/', '\\') |
| dst = os.path.join(runfiles, alias) |
| if not os.path.exists(dst): |
| print(link + ' -> ' + dst) |
| parent = os.path.dirname(dst) |
| if not os.path.exists(parent): |