You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Vijay Aravamudhan <av...@gmail.com> on 2008/03/03 21:51:25 UTC
Verifying checksum of files after ftp'ing to remote server
hi,
In our build process, some files are ftp'ed onto a remote server. I
would like to incorporate a step that can be used to verify that the ftp
process worked correctly - by verifying the checksum of the local
file(s) to the corresponding remote one(s). Could someone please help
with how this can be done?
I have looked at the checksum task - but am not sure how to do this for
a file that resides on a remote ftp server.
Here is a code snippet of the ant file that I would like to use:
<target name="md5-checksums">
<checksum file="${local.zip.file}" property="md5.local"/>
<checksum file="${remote.zip.file}" property="md5.remote"/>
<condition property="md5.isValid">
<equals arg1="${md5.local}" arg2="${md5.remote}"/>
</condition>
<if>
<istrue value="${md5.isValid}"/>
<then>
<echo>${local.zip.file}: ok</echo>
</then>
<else>
<fail message="${local.zip.file}: Wrong MD5 checksum !!!"/>
</else>
</if>
</target>
thanks,
Vijay
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org