DOS line terminators for triplea_unix.sh in 1.8.0.7

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

DOS line terminators for triplea_unix.sh in 1.8.0.7

RotoValue
I downloaded the new version, and noticed that the bundled triplea_unix.sh file is using DOS line terminators, not Unix ones. Thus on (at least my) Unix-like system, the script fails because it interprets the ending ^M termination character as part of the last word on a line.

I had previously downloaded 1.8.0.5 but did not notice this problem there. It's odd, because github is not showing any changes to the file since 2013, so maybe there's something in the build process which is introducing this (or in the older build process which used to address this, but is no longer there).

Regards,

Geoff

Reply | Threaded
Open this post in threaded view
|

Re: DOS line terminators for triplea_unix.sh in 1.8.0.7

redrum
Administrator
@RotoValue - That's interesting as like you mention the source file in github has DOS line terminators and hasn't been changed since 2013: https://github.com/triplea-game/triplea/blob/master/triplea_unix.sh. I'm guessing that there was a manual step in the build process that was using something like dos2unix to convert all these while creating the all platforms zip. You should be able to fix it by just converting them using dos2unix or a similar tool. We'll need to look into fixing release zip so that everyone doesn't run into that issue.

@Veqryn - Is this something you used to do but forgot to add to the build process?

Reply | Threaded
Open this post in threaded view
|

Re: DOS line terminators for triplea_unix.sh in 1.8.0.7

Veqryn
Administrator
nope, there were no manual steps in the build process.
probably if this really is causing issues, noone noticed til now.  or it only causes issues on some linux machines and not all.
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: DOS line terminators for triplea_unix.sh in 1.8.0.7

redrum
Administrator
@Veqryn - Strange as for some reason 1805 definitely does have Unix endings just no idea where they came from as the source files have DOS endings. I think you're right that it probably only affects certain linux OS's.
Reply | Threaded
Open this post in threaded view
|

Re: DOS line terminators for triplea_unix.sh in 1.8.0.7

Veqryn
Administrator
@ron-murhammer: I believe I know what the issue is.

And when you installed git, you told it to 'checkout windows style line endings', but 'check in unix style line endings', right?  (This is the default choice when installing git on windows.)

This is what caused the issue: your git added the windows style line endings as it was checking out the files.  Then when you packaged up the files into the source zip, it kept them.


Here is what you need to do:
git config --global core.autocrlf input
git config --get core.autocrlf
git checkout master
git reset --hard origin@{0}
git pull


or just start over (my recommendation), by doing the following
git config --global core.autocrlf input
git config --get core.autocrlf
git clone git@github.com:triplea-game/triplea.git
git pull


When finished, please recreate and reupload the source zip and all platforms zip, for both normal and extra maps.
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: DOS line terminators for triplea_unix.sh in 1.8.0.7

RotoValue
Thanks for the quick response!

Yes, I'm running on a Debian box. I should have mentioned earlier that I'd fixed my local copy of the file myself, and it's also plausible many people using a GNU/Linux distribution would be able to fix it easily enough like I did. I just wanted to report the issue so that it could be cleaned up going forward. If it would help, I could e-mail my version of the file.