Ant; how to specify a file is executable, so I don't need chmod + x every time

When I create my application with Ant, it creates a ZIP file.

I have a file shinside this zip that is included as part of the build process. I have to do after each build chmod +x myFile.sh, since ant will not be able to keep its original permissions.

How can I tell ant to save executable permissions for this file?

+5
source share
1 answer

You can do this with the attribute filemode:

<zip destfile="myapp.zip">
    <zipfileset dir="scripts" includes="myscript.sh" filemode="755" />
    <zipfileset dir="build" includes="myapp.jar" />
</zip>
+10
source

All Articles