From af4e0cfe108301985c886b2057af86f808caf787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 18 Apr 2020 10:15:00 +0200 Subject: [PATCH] :bug: Fix Windows line endings for shell scripts after generation (#149) --- 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)