Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ant0wan committed Oct 19, 2023
1 parent 90af3aa commit a146029
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/opentofu.install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
set -o errexit
LATEST="$(curl -s "https://api.github.com/repos/opentofu/opentofu/releases/latest" | jq .tag_name -r | sed 's/^v//g')"
ARCH="$(uname -m | sed 's/x86_64/amd64/')"
OS="$(uname -s)"
TARGET="tofu_${LATEST}_${OS}_${ARCH}.zip"
TMP="/tmp/tofu_${LATEST}"
mkdir -p "$TMP"
sudo wget "https://github.com/opentofu/opentofu/releases/latest/download/tofu_${LATEST}_${OS}_${ARCH}.zip" -O "${TMP}/${TARGET}"
sudo unzip "${TMP}/${TARGET}" tofu -d /usr/local/bin/
sudo chmod +x /usr/local/bin/tofu

0 comments on commit a146029

Please sign in to comment.