[wpkg-users] http based download checksum?

Rainer Meier r.meier at wpkg.org
Thu Jul 17 09:04:29 CEST 2014


Hi Paul,

On 16.07.2014 21:54, Paul McGrath wrote:
>    I want to try using the http option to try and deploy to remote workers.  In the event that I 'install' or 'upgrade' is it possible to prevent a file (zip file) from being downloaded again to the user if it already exists on the target computer?
> How would you code this into the 'install' line?  Do you have to use some sort of checksum tool incase the zip file has changed?

You might like to have a look at the downloader tool bundled with WPKG 
distribution package (or see here: 
<http://sourceforge.net/p/wpkg/code/HEAD/tree/wpkg/stable/src/main/resources/wpkg/tools/downloader/>).

The script is designed to allow flexible download of files from HTTP/FTP (via 
wget) or UNC paths (via Robocopy). The use-case to keep the downloaded files 
isn't really tested but I believe you can achieve it by removing/commenting line 
241 to clean the file before download and perhaps introducing another "if exist" 
for the actual downloadat line 266. Perhaps wget will handle it already and not 
re-download files which didn't change. You need to test it I guess.

Moreover the script already supports MD5 & SHA1 checksum verification of 
downloaded files.

br,
Rainer



More information about the wpkg-users mailing list