From 44ca9cbd1366ba265a065b51821de9a943d817e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 18 Apr 2020 10:02:45 +0200 Subject: [PATCH] :bug: Fix Windows line endings for shell scripts after generation --- 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 0000000000..2ca5260dac --- /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)