Download recipes which use URLDownloader (which is almost if not all of them) already have this kind of functionality.
URLDownloader does not re-download the file if it determines (based on ETag, Last-Modified headers or file size matches) that the file you've already downloaded matches the one you would be about to download on the server.
For example:
➜ ~ autopkg run -v AdobeReader.download
Processing AdobeReader.download...
AdobeReaderURLProvider
AdobeReaderURLProvider: Found URL
http://ardownload.adobe.com/pub/adobe/reader/mac/11.x/11.0.10/en_US/AdbeRdr11010_en_US.dmg
URLDownloader
URLDownloader: Item at URL is unchanged.
URLDownloader: Using existing /Users/tsutton/Library/AutoPkg/Cache/com.github.autopkg.download.AdobeReader/downloads/AdobeReader.dmg
In this case the recipe is not _stopped_, it just doesn't re-download the file. If recipes were stopped, that would be bad, because recipes based on the download recipes would also stop.
Tim
> --
> You received this message because you are subscribed to the Google Groups "autopkg-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
autopkg-discu...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.