-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalize line endings #141
Conversation
Thanks for your effort determining the root cause of the Windows issue! However, I'm not sure this actually fully accomplishes what you want it to. To my knowledge the |
This would be correct, however this is primarily to target the shell scripts in this repository, less so the submodules. Upstream would have to add their own attributes. I agree that the other file types do need it however, but I'm not sure which ones quite need it. |
The error in #96 occurs when invoking a shell script from a submodule via shebang. Later on it’d face the same issue with files directly in this repo, yes, but unless the ones in the submodules also work this change is pointless. Is there a way to also automatically stop the line ending mangling in submodules? If yes, that’s good and please test with a fresh clone and |
AFAIK there's no way to do so, because that's Git's design. What alternative are you looking at? |
@LewisTehMinerz: Ensure --- a/Makefile_licence
+++ b/Makefile_licence
@@ -32,7 +32,7 @@ dist/license/all: dist/license/subtitlesoctopus $(addprefix dist/license/, $(LIB
) :
mv dist/license/all dist/license/all.tmp
- build/license_lint.awk dist/license/all.tmp build/license_fullnotice
+ awk -f build/license_lint.awk dist/license/all.tmp build/license_fullnotice
cat dist/license/all.tmp build/license_fullnotice > dist/license/all
dist/js/COPYRIGHT: dist/license/all
diff --git a/functions.mk b/functions.mk
index 6638a88..c0a83d2 100644
--- a/functions.mk
+++ b/functions.mk
@@ -25,7 +25,7 @@ define PREPARE_SRC_VPATH
endef
# All projects we build have autogen.sh, otherwise we could also fallback to `autoreconf -ivf .`
-RECONF_AUTO := NOCONFIGURE=1 ./autogen.sh
+RECONF_AUTO := NOCONFIGURE=1 sh ./autogen.sh
# @arg1: path to source directory; defaults to current working directory
define CONFIGURE_AUTO Then attempt to build all binaries and accompanying files as described in |
$ wsl ./run-docker-build.sh
zsh:1: ./run-docker-build.sh: bad interpreter: /bin/sh^M: no such file or directory
$ wsl sh ./run-docker-build.sh
./run-docker-build.sh: 2: set: Illegal option - Also, for note, I already tried running Linux & co. has no special handling for CR at all, so it just treats it as yet another character. It only handles LFs. |
Well, unless you’ve got another idea, I'm afraid nothing reasonable will make this automatically work with Docker on Windows. Since the shell inside the Linux Docker Container won't accept scripts wiht CRLF line endings, the If you have no other suggestion, I guess we could at least put a note about |
I can't think of any real alternative that would work except advising everyone to turn off autocrlf or run dos2unix on every file after cloning (e.g. re msys2: Pretty sure the bash included with that does the same thing too. |
For the record, that's a bad idea as some submodules contain files with intentional CRLF line-endings. |
Thought it would be. 🤣 |
Can the
|
This will fix quirky issues with the shell scripts such as #96.