perf: install env checks

This commit is contained in:
2025-12-23 20:53:55 +02:00
parent a286817ce3
commit 891ae505f8
30 changed files with 492 additions and 490 deletions

View File

@@ -6,8 +6,8 @@
#
if ! command -v terraform &>/dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if command -v apt-get >/dev/null 2>&1; then
case "$DOTS_PKG" in
apt)
terraform_keyring_path="/usr/share/keyrings/hashicorp-archive-keyring.gpg"
if [[ ! -f "$terraform_keyring_path" ]]; then
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o "$terraform_keyring_path"
@@ -17,15 +17,18 @@ if ! command -v terraform &>/dev/null; then
sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt-get update -qq &&
sudo apt-get install -qq terraform
elif command -v pacman >/dev/null 2>&1; then
;;
pacman)
sudo pacman -S --noconfirm terraform
else
;;
brew)
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
;;
*)
log_warn "Skipping Terraform install: no supported package manager found"
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
fi
;;
esac
fi
terraform --version