at master 429 B view raw
1 2import json 3from pathlib import Path 4import sys 5import toml 6 7overrides_path = Path(sys.argv[1]) 8out_path = Path(sys.argv[2]) 9 10with open(overrides_path, "r") as f: 11 overrides = json.loads(f.read()) 12 13result = {} 14 15for (uuid, artifacts) in overrides.items(): 16 if len(artifacts) == 0: continue 17 18 for (name, info) in artifacts.items(): 19 result[info["sha1"]] = info["path"] 20 21with open(out_path, "w") as f: 22 toml.dump(result, f)