From 34f3f29076e04e6ad1d8fd61a4fb707426b3d492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 18 Apr 2020 10:17:24 +0200 Subject: [PATCH] :bug: Fix Windows shell scripts line endings after generation (#28) --- hooks/post_gen_project.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 hooks/post_gen_project.py diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py new file mode 100644 index 0000000..2ca5260 --- /dev/null +++ b/hooks/post_gen_project.py @@ -0,0 +1,8 @@ +from pathlib import Path + + +path: Path +for path in Path(".").glob("**/*.sh"): + data = path.read_bytes() + lf_data = data.replace(b"\r\n", b"\n") + path.write_bytes(lf_data)