chilcote/vfuse

add option for checksum of cached dmg

Closed this issue · 3 comments

When downloading a dmg, it would be awesome if you could specify a checksum in case of failed downloads.

Took a stab at this. https://github.com/chilcote/vfuse/tree/checksum

Generate a checksum if needed with: vfuse --checksum /path/to/dmg
Add to the template: "checksum": "808c86a684b0bc05d352etcblahblahblah"

When caching the DMG, it will take a checksum and save it to a json file in ~/.vfuse/ along with the DMG. On subsequent runs it will compare this checksum against what's in the template. If the checksums don't match it will re-download the dmg. Also, when it downloads and generates a checksum, if that doesn't match what's in the template, it'll throw an error and exit (this is for the incomplete download scenario).

I think I tested all possible operations, but I'm sure I missed some. Give it a try and let me know.

I haven't checked this out yet, but hopefully soon. So many other things I'm working on at the moment.

No worries. I did a test with an https store, and it worked out. Just want someone else to verify before pushing it to master.