PCGen / pcgen

Main code and data development for pcgen program release
http://pcgen.org
GNU Lesser General Public License v2.1
432 stars 339 forks source link

^M in the sh file and possibly other files #1404

Closed mpop1 closed 7 years ago

mpop1 commented 8 years ago

In the zip download, in all the text files there are trailing ^M, in the bash shell script this make the code unrunnable. This might want to be fixed in the next version, probably have a windows download, and a separate Mac and Linux download, as the ^M is a DOS artifact.

For those of you looking here because of the issue, easly fixed by using dos2unix on the pcgen.sh file, and things will correctly

LegacyKing commented 8 years ago

The line endings is a constant issue. I build on Windows, ergo the files are compiled with the Windows line endings. Not sure how to overcome that on a Windows build. We could save the sh file elsewhere. I am trying to get the build made on the server and thus avoid this issue entirely.

icosahedron commented 8 years ago

git has a setting to alter the line endings on check in and check out. I can give you more information if you want. It's important to have a canonical representation in the repo.

LegacyKing commented 8 years ago

@cpmeister this is your scope, this ties into @javydreamercsw effort to make the build on the server, instead of forcing release monkeys to use different builds.

javydreamercsw commented 8 years ago

There are changes on this branch to address that: https://github.com/javydreamercsw/pcgen/tree/ADMIN-44

javydreamercsw commented 7 years ago

@icosahedron really interested on those settings. Can you provide more info?

Since the PR is still stuck I guess I could add those and remove some workarounds.

tgm4883 commented 7 years ago

@javydreamercsw He's probably talking about .gitattributes You can declare the line endings a file will have on checkout (examples on that page). You'll probably want something similar to this example.

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf

Depending on the editor you use, there may be some options for different files in there. I know in Atom there's some settings for line endings.

javydreamercsw commented 7 years ago

Thanks @tgm4883, I'll take a look.

javydreamercsw commented 7 years ago

@LegacyKing can you provide a list of files that should have this setting?

javydreamercsw commented 7 years ago

I see there's a .gitattributes file there but seems to be badly configured. As per the documentation:

You'll notice that files are matched--.c, .sln, *.png--, separated by a space, then given a setting--text, text eol=crlf, binary

Some of them had tabs and more than one spaces between the file and the options so I wouldn't be surprised some are not applied.

Commited change in 7ddf5e47693c62a0bdc7fb6afb4025d0b318f695