Open philips opened 5 years ago
I guess it would be also useful to pass the hash of the single file being downloaded directly as a parameter.
If the receiver trust the instructions, a single copy paste would suffice:
rget --hash b41491157076ccfa52e7b9b0ee695afd24c5d720ea9e40933ef908e69ec19368 \
https://github.com/etcd-io/etcd/releases/download/v3.3.13/etcd-v3.3.13-darwin-amd64.zip
I did something similar in https://github.com/mkmik/runck, but also conflating the issue of executing an installer (as a proof of concept for an alternative to curl | bash)
@mkmik yes, I agree both are needed. I don't know what to do if the pin db and the flag provided disagree though. Issue a warning? Exit?
@philips perhaps we can start making those flags mutually exclusive?
There needs to be a way for a user to save the digest of the files received and ensure that if fetched again that the contents match the last digest. There are a few uses for that:
Rough UX of what I am thinking:
Append to the file if this URL is missing, otherwise verify
Append/create URL entry to a pin file for a given URL: