parent
717ca3e727
commit
f6d2bd0225
|
@ -14,8 +14,10 @@ def copy_and_patch(patch,orig,editor):
|
||||||
except shutil.SameFileError:
|
except shutil.SameFileError:
|
||||||
pass
|
pass
|
||||||
damask.util.run(f'patch {orig.parent/patch.stem} {patch} -b')
|
damask.util.run(f'patch {orig.parent/patch.stem} {patch} -b')
|
||||||
with open(orig.parent/patch.stem) as f_in, open(orig.parent/patch.stem,'w') as f_out:
|
with open(orig.parent/patch.stem) as f_in:
|
||||||
f_out.write(f_in.read().replace('%EDITOR%',editor))
|
content = f_in.read()
|
||||||
|
with open(orig.parent/patch.stem,'w') as f_out:
|
||||||
|
f_out.write(content.replace('%EDITOR%',editor))
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
|
|
Loading…
Reference in New Issue