Hi,

I have the following problem with the new filterchain support:

I have a script .in file which has some tokens which need to be replaced
at buildtime. So i have a <copy> task with filterchain support for this:

<!-- install the monodevelop script -->
<copy file="monodevelop.in" tofile="monodevelop">
    <filterchain>
        <replacetokens>
            <token key="bindir" value="${bin.dir}"/>
            <token key="libdir" value="${lib.dir}"/>
            <token key="monodir" value="${path::combine(pkg-config::get-
variable('mono', 'prefix'), 'bin')}"/>
        </replacetokens>
    </filterchain>
</copy>
<!-- work around shortcoming of NAnt: no <chmod> task available atm -->
<exec program="chmod" commandline="a+x monodevelop"/>
<move file="monodevelop" todir="${bin.dir}"/>

This works fine except for one crucial thing: after running the build
file, i *cannot execute the resulting script*!!!

Here's what i think happens: nant somehow changes the encoding of the
file. If i check the encoding/file type of monodevelop.in i get the
following back:

$ file src/Core/monodevelop.in
src/Core/monodevelop.in: Bourne-Again shell script text executable

If i do the same with the end result (monodevelop), i get this:

$ file build/bin/monodevelop
build/bin/monodevelop: UTF-8 Unicode text

And then bash doesn't want to execute the script:

$ build/bin/monodevelop
-bash: build/bin/monodevelop: cannot execute binary file

Any ideas?

Thanks,

Jeroen
 



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to