čtvrtek 14. října 2010

Fixing Line Terminators for Cygwin CVS

I have to use a Windows operating system (unfortunately :-)) and CVS in my current job. Thanks to the Cygwin, I can work with Windows almost as effectively as in Linux. The CVS (CVSNT) installation in Windows and other CVS tools installed in on my Windows box (TortoiseCVS, Eclipse) stores the CVS files with CRLF line terminators (EOLs). The Cygwin CVS client requires the classic UNIX LT terminator. Fortunatelly, the Windows CVS clients can read the UNIX-way text files, too. So, I have creates a simple bash script to forx this problem:
#!/bin/sh
find . -type f -path '*/CVS/*' -print0 | xargs -0 dos2unix 
Hope, someone may find it useful.