From e63201efc11bf44a7d30fff0a82a9fefd29b8d46 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 3 Feb 2021 16:54:10 +0100 Subject: Moving utils to bin/. --- bin/terraform | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 bin/terraform (limited to 'bin/terraform') diff --git a/bin/terraform b/bin/terraform new file mode 100644 index 0000000..554ea8b --- /dev/null +++ b/bin/terraform @@ -0,0 +1,22 @@ +#!/bin/bash + +set -euo pipefail + +basedir=$(dirname "$0") + +version=0.14.5 +url=https://releases.hashicorp.com/terraform/${version}/terraform_${version}_linux_amd64.zip + +bin="$basedir/.tmp/$version/terraform" + +if [[ ! -x "$bin" ]] +then + mkdir -p $(dirname "$bin") + wget -O "$bin.zip" "$url" + cd $(dirname "$bin") + unzip "$bin.zip" terraform + chmod +x terraform + cd - +fi + +exec "$bin" "${@}" -- cgit v1.2.3