diff --git a/website/docs/intro/install/brew-install.sh b/website/docs/intro/install/brew-install.sh new file mode 100644 index 0000000000..d71119012a --- /dev/null +++ b/website/docs/intro/install/brew-install.sh @@ -0,0 +1 @@ +brew install opentofu \ No newline at end of file diff --git a/website/docs/intro/install/brew.sh b/website/docs/intro/install/brew.sh new file mode 100755 index 0000000000..291d8a4f71 --- /dev/null +++ b/website/docs/intro/install/brew.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -ex + +apt-get update +apt-get install -y curl git build-essential gcc procps curl file + +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /root/.bashrc +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + +bash -x brew-install.sh + +tofu --version diff --git a/website/docs/intro/install/docker-compose.yaml b/website/docs/intro/install/docker-compose.yaml index 167c3c8192..c3f23be3e6 100644 --- a/website/docs/intro/install/docker-compose.yaml +++ b/website/docs/intro/install/docker-compose.yaml @@ -82,3 +82,11 @@ services: type: bind command: /data/rpm.sh working_dir: /data + brew: + image: ubuntu + volumes: + - source: ./ + target: /data + type: bind + command: /data/brew.sh + working_dir: /data diff --git a/website/docs/intro/install/homebrew.mdx b/website/docs/intro/install/homebrew.mdx index cc1705edbb..159ebf5e06 100644 --- a/website/docs/intro/install/homebrew.mdx +++ b/website/docs/intro/install/homebrew.mdx @@ -5,10 +5,10 @@ description: |- Install OpenTofu on MacOS or Linux. --- -# Installing OpenTofu via Homebrew +import BrewScript from '!!raw-loader!./brew-install.sh' + +# Installing OpenTofu via Homebrew You can use OpenTofu as a [portable binary](portable.mdx) or you can install it using [Homebrew](https://formulae.brew.sh/formula/opentofu). OpenTofu is available in the Homebrew Core repository, so you can install it by running: -``` -brew install opentofu -``` +{BrewScript}