Quote:
Originally Posted by Hitori
We build java program under windows and use different scripts to run this program. So our build contains .bat and .sh-files. Then this build is deployed under windows and unix. I cannot make 2 separate builds (for Unix/Windows).
But your shell script is only run on Linux and the .bat only on Windows. Am I right? If so, just check out the whole project on Linux then the EOL will be \n, and the shell script will work. Check out the project again on Windows, the EOL will be \r\n, and the .bat will work. This is the same set of sources and you just check out two times on two different platforms. I still don't understand why this cannot be done as I know many projects have mixed .sh and .bat using CVS in similar situations as you are in.
If the shell script checked out on Linux still has the \r, that means either
(1) the file has been set to binary mode (previously or currently) and later checked in from Windows with the EOL changed, probably silently by the editor;
(2) has otherwise been corrupted with spurious control characters.
Then you should fix by removing all the \r, set the file to ASCII, and commit it back to CVS to fix the problem. In most cases I still do not encourage switching to all Binary mode without careful checking, as the change may easily lead to more severe corruptions, rather than fixing anything.