Shell script for downloading HashiCorp binaries.
Requires jq (brew install jq
) and gpg (brew cask install gpg-suite
).
I structure all my binaries as ~/devel/HashiCorp/binaries/<product>-<version>/<product>
and adjust paths as needed based on the project I'm working on.
Version to download is optional; defaults to latest.
[:~] $ ~/devel/HashiCorp/binaries/dl.sh consul
current version: 1.6.2
retrieving consul 1.6.2
:: binary
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 38.3M 100 38.3M 0 0 11.6M 0 0:00:03 0:00:03 --:--:-- 11.6M
:: SHA256SUMS
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1148 100 1148 0 0 14316 0 --:--:-- --:--:-- --:--:-- 14350
:: SHA256SUMS signature
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 310 100 310 0 0 3734 0 --:--:-- --:--:-- --:--:-- 3780
verifying GPG signature
gpg: Signature made Wed Nov 13 16:32:50 2019 EST
gpg: using RSA key 91A6E7F85D05C65630BEF18951852D87348FFC4C
gpg: Good signature from "HashiCorp Security <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 91A6 E7F8 5D05 C656 30BE F189 5185 2D87 348F FC4C
consul_1.6.2_darwin_amd64.zip: OK
Archive: consul_1.6.2_darwin_amd64.zip
inflating: consul
=> /Users/blalor/devel/HashiCorp/binaries/consul-1.6.0/consul