only used together
This commit is contained in:
parent
9cc1e33940
commit
98491c61c8
|
@ -14,9 +14,8 @@ def copy_and_patch(patch,orig,marc_root,editor):
|
|||
except shutil.SameFileError:
|
||||
pass
|
||||
damask.util.run(f'patch {orig.parent/patch.stem} {patch} -b')
|
||||
with open(orig.parent/patch.stem) as f_in:
|
||||
with open(orig.parent/patch.stem) as f_in, open(orig.parent/patch.stem,'w') as f_out:
|
||||
content = f_in.read()
|
||||
with open(orig.parent/patch.stem,'w') as f_out:
|
||||
f_out.write(content.replace('%INSTALLDIR%',f'{marc_root}').replace('%EDITOR%',editor))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue