Ant EXEC failing to run bash script -


i trying use ant run bash script.

ive found exec directive tool job

i created bash script test.sh , in ant target 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 build successful when run it, test.sh never run.

i have googled , searched doing wrong because there no error having trouble debugging it. know proper usage of exec directive or if there doing wrong. can tell doing same ever other example of exec have found.

if have shebang in bash script, , script executable, don't need include bash command. (i am, of course, assuming linux, unix, or mac).

<exec executable="${path.to.command}/cmd_update.sh"     failonerror="true"     osfamily="unix"/> 

always set failonerror true , set osfamily.

there maybe other things want set property stdout , stderr stored. can pass parameters via <arg value> sub-tasks.

i not use searchpath parameter since security hole.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -