otros-systems / otroslogviewer

Log viewer focused on developers work
Apache License 2.0
424 stars 86 forks source link

"olv.sh" doesn't run in Debian GNU/Linux #635

Open negora opened 2 years ago

negora commented 2 years ago

Description.

When I try to run olv.sh in Debian GNU/Linux, I get this error:

/bin/bash^M: bad interpreter: No such file or directory

It has turned to be because the file has CRLF line endings (Windows) instead of LF ones (Linux).

Workaround.

I've run this Perl script to solve it:

perl -p -i -e 's/\r\n/\n/' olv.sh

Technical specifications.

Thank you.

svennissel commented 2 years ago

The problem was my local window pc. It used \r\n and git do not used updated version from git with \n. Has someone a idea to fix it automatic with gradle build one building distribution zip?

negora commented 2 years ago

Does it help? What is the easiest way convert line endings to unix style when creating tar file in Gradle?. The thread is about Tar but I guess it's applicable to Zip too. I don't use Gradle, so just a guess...

svennissel commented 2 years ago

I added a test case to check the files. It is not the best solution but better than nothing