unix2dos (or dos2unix) in ant
Asked Answered
H

2

13

How do I do unix2dos (or dos2unix) with ant. I.e. I want to change the newlines from linux newlines (if any) to dos newlines

Houseless answered 16/3, 2009 at 11:47 Comment(0)
S
22

Found - it is the Ant FixCRLF task.

Shippy answered 16/3, 2009 at 11:47 Comment(2)
Wow! It's the first time I can actually say "Jon Skeet saved my week!" :)Ongoing
Guess, who else got their day saved (ik its 2020) :DKierstenkieselguhr
E
5

You can use the built-in fixcrlf ant task on a set of files instead of using dos2unix.
The following example is equal to running dos2unix on all *.sql files located under the "SQL" directory:

<fixcrlf srcdir="${SQL}" includes="**/*.sql" eol="lf" eof="remove" />

see for more details.

Euphonize answered 16/3, 2009 at 11:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.