open-nomad/scripts/vagrant-linux-priv-vault.sh
Mahmood Ali 17059d0a1e ci: use curl
It's installed by default in macOS unlike wget
2020-03-23 13:27:58 -04:00

23 lines
458 B
Bash
Executable file

#!/usr/bin/env bash
set -o errexit
VERSION=0.10.2
DOWNLOAD=https://releases.hashicorp.com/vault/${VERSION}/vault_${VERSION}_linux_amd64.zip
function install_vault() {
if [[ -e /usr/bin/vault ]] ; then
if [ "v${VERSION}" = "$(vault version | head -n1 | awk '{print $2}')" ] ; then
return
fi
fi
curl -sSL --fail -o /tmp/vault.zip ${DOWNLOAD}
unzip -d /tmp /tmp/vault.zip
mv /tmp/vault /usr/bin/vault
chmod +x /usr/bin/vault
}
install_vault