Submitted by: Martin van den Bemt <mllist at mvdb dot net> git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273663 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -141,6 +141,8 @@ Other changes: | |||||
| * <zip> can now store Unix permissions in a way that can be | * <zip> can now store Unix permissions in a way that can be | ||||
| reconstructed by Info-Zip's unzip command. | reconstructed by Info-Zip's unzip command. | ||||
| * <fixcrlf>'s eol attribute now also understand "mac", "unix" and "dos". | |||||
| Changes from Ant 1.5.1Beta1 to 1.5.1 | Changes from Ant 1.5.1Beta1 to 1.5.1 | ||||
| ==================================== | ==================================== | ||||
| @@ -970,8 +970,8 @@ | |||||
| <fileset dir="${script.dir}/"/> | <fileset dir="${script.dir}/"/> | ||||
| </copy> | </copy> | ||||
| <fixcrlf srcdir="${dist.bin}" eol="crlf" includes="*.bat"/> | |||||
| <fixcrlf srcdir="${dist.bin}" eol="lf"> | |||||
| <fixcrlf srcdir="${dist.bin}" eol="dos" includes="*.bat"/> | |||||
| <fixcrlf srcdir="${dist.bin}" eol="unix"> | |||||
| <include name="ant"/> | <include name="ant"/> | ||||
| <include name="antRun"/> | <include name="antRun"/> | ||||
| <include name="*.pl"/> | <include name="*.pl"/> | ||||
| @@ -1142,8 +1142,8 @@ | |||||
| </fileset> | </fileset> | ||||
| </copy> | </copy> | ||||
| <fixcrlf srcdir="${src.dist.dir}" eol="crlf" includes="*.bat"/> | |||||
| <fixcrlf srcdir="${src.dist.dir}" eol="lf"> | |||||
| <fixcrlf srcdir="${src.dist.dir}" eol="dos" includes="*.bat"/> | |||||
| <fixcrlf srcdir="${src.dist.dir}" eol="unix"> | |||||
| <include name="**/*.sh"/> | <include name="**/*.sh"/> | ||||
| <include name="**/*.pl"/> | <include name="**/*.pl"/> | ||||
| <include name="**/ant"/> | <include name="**/ant"/> | ||||
| @@ -100,6 +100,9 @@ supports all attributes of <code><fileset></code> | |||||
| <li>cr: convert all EOLs to a single CR</li> | <li>cr: convert all EOLs to a single CR</li> | ||||
| <li>lf: convert all EOLs to a single LF</li> | <li>lf: convert all EOLs to a single LF</li> | ||||
| <li>crlf: convert all EOLs to the pair CRLF</li> | <li>crlf: convert all EOLs to the pair CRLF</li> | ||||
| <li>mac: convert all EOLs to a single CR</li> | |||||
| <li>unix: convert all EOLs to a single LF</li> | |||||
| <li>dos: convert all EOLs to the pair CRLF</li> | |||||
| </ul> | </ul> | ||||
| Default is based on the platform on which you are running | Default is based on the platform on which you are running | ||||
| this task. For Unix platforms, the default is "lf". | this task. For Unix platforms, the default is "lf". | ||||
| @@ -226,10 +226,10 @@ public class FixCRLF extends MatchingTask { | |||||
| String option = attr.getValue(); | String option = attr.getValue(); | ||||
| if (option.equals("asis")) { | if (option.equals("asis")) { | ||||
| eol = ASIS; | eol = ASIS; | ||||
| } else if (option.equals("cr")) { | |||||
| } else if (option.equals("cr") || option.equals("mac")) { | |||||
| eol = CR; | eol = CR; | ||||
| eolstr = "\r"; | eolstr = "\r"; | ||||
| } else if (option.equals("lf")) { | |||||
| } else if (option.equals("lf") || option.equals("unix")) { | |||||
| eol = LF; | eol = LF; | ||||
| eolstr = "\n"; | eolstr = "\n"; | ||||
| } else { | } else { | ||||
| @@ -1045,7 +1045,8 @@ public class FixCRLF extends MatchingTask { | |||||
| * @see EnumeratedAttribute#getValues | * @see EnumeratedAttribute#getValues | ||||
| */ | */ | ||||
| public String[] getValues() { | public String[] getValues() { | ||||
| return new String[] {"asis", "cr", "lf", "crlf"}; | |||||
| return new String[] {"asis", "cr", "lf", "crlf", | |||||
| "mac", "unix", "dos"}; | |||||
| } | } | ||||
| } | } | ||||