Last active
March 23, 2023 19:11
-
-
Save bmritz/c48b092563d2d523a44ed636a1b3cb05 to your computer and use it in GitHub Desktop.
make bin/terraform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UNAME_S := $(shell uname -s) | |
UNAME_M := $(shell uname -m) | |
ifeq ($(UNAME_S),Darwin) | |
OS := darwin | |
else | |
OS := linux | |
endif | |
ifeq ($(UNAME_M),x86_64) | |
ARCH := amd64 | |
else ifeq ($(UNAME_M),arm64) | |
ARCH := arm64 | |
endif | |
bin/terraform: | |
which wget || (brew install wget || apt-get install wget) | |
which unzip || (brew install unzip || apt-get install unzip) | |
mkdir -p bin | |
wget https://releases.hashicorp.com/terraform/0.13.5/terraform_0.13.5_$(OS)_$(ARCH).zip -O bin/terraform.zip | |
unzip -o bin/terraform.zip -d bin | |
rm bin/terraform.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment