Could someone please help me with an example Target of how to run two (or more) Unix commands using a Bash shell from within an Ant Target but without writing a new shell script.
I found an answer here How to run multiple Unix Commands in one time? which is great but recommends creating a shell script which I don't want to do.
The code I am using so far is like this, it works but I am wondering if there is a neater way of doing it - in one tag perhaps with the two commands separated by a ";" or perhaps using an < exec > tag rather than the < shellscript > shown.
<target name="dos2unixTidyUp" depends="deleteTemp" if="isUnix" >
<shellscript shell="bash" dir="${my-app-bin.dir}" osfamily="unix" >
dos2unix *.sh
</shellscript>
<echo>dos2Unix formatting completed</echo>
<shellscript shell="bash" dir="${my-app-bin.dir}" osfamily="unix" >
chmod +x *.sh
</shellscript>
<echo>chmod +x *.sh commanded completed</echo>
</target>
For your answers please provide an Example < target > answer in here !! < /target >
If its possible to separate commands using a ";" can the commands be on separate lines or do they have to be on the same line.