I got failure when
command="find . -maxdepth 1 -name ${reporting.db}.\*\.001 |
wc -l"/>
... the trick is why doesn't 0 -eq 0 is when it has EOL so adding pipe xargs
echo -n resolved this bug
hope this helps test your condition.
<target name="db2-test">
<sshexec host="${reporting.host}" trust="true"
username="${reporting.user}" password="${reporting.password}"
outputproperty="reporting.backup.count" failonerror="true"
command="find . -maxdepth 1 -name ${reporting.db}.\*\.001 |
wc -l | xargs echo -n"/>
<condition property="missing.backup">
<equals arg1="${reporting.backup.count}" arg2="0"/>
</condition>
</target>
<target name="testdb" depends="db2-test" unless="missing.backup">
...
</target>
--
View this message in context:
http://ant.1045680.n5.nabble.com/Checking-a-property-with-ant-tp1350385p3242389.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]