From 1bc4324034e197e9c2692356bcf0bb9fefd70a33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20H=C3=B6xter?= Date: Mon, 2 Mar 2020 13:42:50 +0100 Subject: [PATCH] fix terraform downloader script location header parsing Seems github implemented http2 somewhere and now the location header is lower case. --- artifactory/terraform-dl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifactory/terraform-dl.sh b/artifactory/terraform-dl.sh index 19e5e34..f62be23 100755 --- a/artifactory/terraform-dl.sh +++ b/artifactory/terraform-dl.sh @@ -1,7 +1,7 @@ #!/bin/sh LATEST_LINK="https://github.com/hashicorp/terraform/releases/latest" -VERSION="$(curl -si ${LATEST_LINK} | grep Location | grep -Po '[0-9]\.[0-9]{1,2}\.[0-9]+')" +VERSION="$(curl -sI ${LATEST_LINK} | grep -i '^Location' | grep -Po '[0-9]\.[0-9]{1,2}\.[0-9]+')" BASE_DOWNLOAD="https://releases.hashicorp.com/terraform/${VERSION}/" ARCH="amd64" OS="linux" -- 2.39.2