Testable Homebrew instructions (#984)

Signed-off-by: Janos Bonic <86970079+janosdebugs@users.noreply.github.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
Janos 2023-12-08 17:27:08 +01:00 committed by GitHub
parent 9b7a6df249
commit 5fc6ba240d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 4 deletions

View File

@ -0,0 +1 @@
brew install opentofu

View File

@ -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

View File

@ -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

View File

@ -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
```
<CodeBlock language="shell">{BrewScript}</CodeBlock>