Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant exec refactoring

Tags:

I've this code in my build.xml:

    <exec executable="cmd" osfamily="winnt">
        <arg value="/c"/>
        <arg value="xsltproc\bin\xsltproc.exe"/>
        <arg value="--xinclude"/>
        <arg value="-o"/>
        <arg value="dist/html/main.html"/>
        <arg value="xsl/html/docbook.xsl"/>
        <arg value="xml/main.xml"/>
    </exec>
    <exec executable="xsltproc" osfamily="unix">
        <arg value="--xinclude"/>
        <arg value="-o"/>
        <arg value="dist/html/main.html"/>
        <arg value="xsl/html/docbook.xsl"/>
        <arg value="xml/main.xml"/>
    </exec>

the sequence is the same... I'm wondering about how refactoring this small fragment in order to keep it DRY.