Skip to content

Instantly share code, notes, and snippets.

@v6
Last active September 20, 2018 20:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save v6/d7c1f40a25b5a12a469d76f7efb7733e to your computer and use it in GitHub Desktop.
Save v6/d7c1f40a25b5a12a469d76f7efb7733e to your computer and use it in GitHub Desktop.
// , Install Vault on Mac OSX
#!/usr/bin/env bash
## Install the latest Vault on a Mac.
## Run this as follows:
## bash <(curl -s https://gist.githubusercontent.com/v6/d7c1f40a25b5a12a469d76f7efb7733e/raw/59f0f5e4cc3bba4d01ce2c4099f8df0cee72d187/latestvaultosx.sh)
release="$(curl -s https://releases.hashicorp.com/vault/index.json|jq -r '.versions[].version'|grep -v 'beta\|rc' | grep '0.1' | tail -n 1)"
download="https://releases.hashicorp.com/vault/${release}/vault_${release}_darwin_amd64.zip"
echo "Vault Release: ${release}"
echo "Vault Download: ${download}"
curl -s -o /tmp/consul_${release}_darwin_amd64.zip ${download}
unzip -o /tmp/consul_${release}_darwin_amd64.zip -d /usr/local/bin/
chmod 755 /usr/local/bin/vault
echo "complete -C /usr/local/bin/vault vault" >> ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment