ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vihan Pandey" <vihanpan...@gmail.com>
Subject Re: for task with inline exec?
Date Mon, 20 Aug 2007 17:06:23 GMT
> Ant knows it is on windows and uses backslashes when storing
> filenames in properties and paths.
> These cause havoc if used in scripts for example:
>
> <ac:bash>
>   ls -rtla ${basedir}
> </ac:bash>
>
> there are ways to work around this, however, they are usually not
> worth it.

Interesting.

Oh by the way I forgot to post the ``whole working code" in my last to
last post so here it is :

---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----

        <taskdef resource="net/sf/antcontrib/antlib.xml">
          <classpath>
            <pathelement location="/usr/local/ant/lib/ant-contrib-1.0b3.jar"/>
          </classpath>
        </taskdef>

---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----

<shellscript shell="bash" outputproperty="js.list">
    cat deploy.properties | grep .js-version| sed
s/.js-version=v.[0-9]*/,/g | tr -d '\n' | sed s/,$//g
</shellscript>

<echo>JS list: ${js.list}</echo>

       <for list="${js.list}" param="myval">

         <sequential>
<replace dir="${docroot-re01}" token="/javascripts/@{myval}.js"
value="http://js.cleartrip.com/javascripts/@{myval}.${@{myval}.js-version}.js"
>
<include name="**/*.html"/>
<include name="**/*.shtml"/>
</replace>
         </sequential>
       </for>

---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----

Just in case someone had the same problem I wanted them to know that I
used taskdef instead of typedef :-)

Regards,

-vihan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message