gruntwork-io / fetch

Download files, folders, and release assets from a specific git commit, branch, or tag of public and private GitHub repos.
https://www.gruntwork.io/
MIT License
587 stars 90 forks source link

Support for fetching multiple tools using some declarative configuration #107

Open iilyak opened 2 years ago

iilyak commented 2 years ago

Describe the solution you'd like

Add command line argument to specify a configuration file which would contain list of repositories to download in parallel. My use case is to bootstrap environment using following algorithm.

  1. download a bunch of tools and verify sha256 of each downloaded artifact.
  2. Then do chmod +x for each one of them.
  3. Finally only iff sha256 is verified move the file to its final destination

Bonus feature: Ability to specify dependencies between the tools to establish right installation order.

Describe alternatives you've considered

  1. use jq to get list of targets and sha and combine it with shell scripts involving sha256,chmod,curl
  2. put urls and SHAs into a bash array and iterate over in a function

None of the above solutions would be portable enough, cannot provide parallel downloads and decent error handling.

Additional context

There are similar tools. However there is none which do both batch artifact download and verification:

Less relevant tools