Hello
i have a Jenkins installed in Windows and i have a project where i have a lot of script file .sh i
so must do dos2unix in commande Ligne for all the file to convert for windows forme to unix forme
<fixcrlf srcdir="${src}" includes="**/*.sh"
eol="lf" eof="remove" />No response ? <344.gif><344.gif><344.gif><344.gif>
Are you using subversion to checkout the project? If so, you might just consider setting the svn:eol property on those files to 'LF' so they always have Unix line endings on checkout.
Hi,
It should be simply a matter of doing the following:This tells subversion to convert the line endings of the file to contain only linefeeds upon checkout, regardless of the type of system it is checked out to. Because scripts are for linux/unix anyway this setting is appropriate. On linux/unix using the command line client the above steps look something like the following:
- Checkout your working copy
- Change to your working copy directory
- Find all the files named *.sh and set the svn property 'svn:eol-style' to the value of 'LF'
# Checkout the working copy
svn co https://hostname.domain/path/to/repo/ my-project
# Change to the working copy directory
cd my-project
# Find all .sh files and set the line ending style to linefeed only
find . -type f -name '*.jsp' | xargs svn propset svn:eol-style LF
If you're not using the command line you can just google for 'setting svn:eol-style <tool-of-choice>' and use the instructions to set the property to 'LF' for linux/unix files.
Good luck,
Happy to hear you were able to solve your problem.