#!/bin/bash
set -eu -o pipefail

S3_SECRETS_HELPER_VERSION=2.1.1

MACHINE="$(uname -m)"

case "${MACHINE}" in
	x86_64)    ARCH=amd64;;
	aarch64)   ARCH=arm64;;
esac

echo "Downloading s3-secrets-helper..."
curl -Lsf -o /usr/local/bin/s3secrets-helper \
	"https://github.com/buildkite/elastic-ci-stack-s3-secrets-hooks/releases/download/v${S3_SECRETS_HELPER_VERSION}/s3secrets-helper-linux-${ARCH}"
sudo chmod +x /usr/local/bin/s3secrets-helper

#!/bin/bash
set -eu -o pipefail

S3_SECRETS_HELPER_VERSION=2.1.1

MACHINE="$(uname -m)"

case "${MACHINE}" in
	x86_64)    ARCH=amd64;;
	aarch64)   ARCH=arm64;;
esac

echo "Downloading s3-secrets-helper..."
sudo curl -Lsf -o /usr/local/bin/s3secrets-helper \
	"https://github.com/buildkite/elastic-ci-stack-s3-secrets-hooks/releases/download/v${S3_SECRETS_HELPER_VERSION}/s3secrets-helper-linux-${ARCH}"
sudo chmod +x /usr/local/bin/s3secrets-helper

Fix curl error 23 write error downloading the binary
Fix curl error 23 write error downloading the binary
