I am trying to use ant to run a bash script.
Ive found that the exec directive is the tool for the job
I created a bash script test.sh and in my ant target i added:
<project basedir=".">
<property name="temp.deployment.dir" value="temp_deployment_dir"/>
<property name="temp.dir" value="temp_upload_dir"/>
<property name="src.dir" value="www"/>
<property name="js.dir" value="${src.dir}/public/js"/>
<property name="css.dir" value="${src.dir}/public/css"/>
<property name="img.dir" value="${src.dir}/public/images/"/>
<target name="clean">
<delete dir="${temp.dir}"/>
</target>
<target name="update-statics">
<mkdir dir="${temp.dir}"/>
<!--TODO: add statics in -->
</target>
<target name="deploy">
<mkdir dir="${$temp.deployment.dir}"/>
<copy todir="${temp.deployment.dir}">
<fileset dir="${src.dir}"/>
</copy>
<exec executable="bash" newenvironment="false" dir=".">
<arg value="cmd_update.sh"/>
</exec>
</target>
</project>
I get build successful when i run it, but the test.sh is never run.
I have googled and searched for what I could be doing wrong but because there is no error I am having trouble debugging it. Does anyone know the proper usage of the exec directive or if there is something I am clearly doing wrong. From What I can tell I am doing it the same as ever other example of exec I have found.