"""Execute unchanged downloaded drivers with capture-round path/SHA relocation only."""
import pathlib,sys,os
root=pathlib.Path('/tmp/lead-33512-r1/capture2')
name=sys.argv.pop(1)
s=(root/'drivers'/name).read_text()
s=s.replace('/tmp/lead-33512-r1/capture','/tmp/lead-33512-r1/capture2').replace("'-base'","'-base2'")
s=s.replace('ee59ab22a8','bbdc7dca32').replace('b7f9bd2ae8','bb8005d7d7')
if name.endswith('.py'):
 sys.argv[0]=str(root/'drivers'/name)
 exec(compile(s,str(root/'drivers'/name),'exec'))
else:
 p=root/name;p.write_text(s)
 os.execvp('node',['node',str(p),*sys.argv[1:]])
