Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant; how to specify a file is executable so I don't have to chmod+x each time

When build my application with Ant, it produces a ZIP file.

I have a sh file inside this zip, that is included as part of the build process. After each build I have to do chmod +x myFile.sh as ant fails to retain its original executable permissions.

How can I instruct ant to keep executable permissions to this file?

like image 631
Jimmy Avatar asked Sep 02 '10 09:09

Jimmy


1 Answers

You can do this with the filemode attribute:

<zip destfile="myapp.zip">
    <zipfileset dir="scripts" includes="myscript.sh" filemode="755" />
    <zipfileset dir="build" includes="myapp.jar" />
</zip>
like image 94
fabstab Avatar answered Oct 27 '22 00:10

fabstab