From ce26a8bfaa92d4011610f4f115bacad1956e1219 Mon Sep 17 00:00:00 2001 From: Buddy Date: Tue, 29 Sep 2026 11:18:38 -0700 Subject: [PATCH] feat: add install script for opentofu --- dot_local/bin/executable_install-opentofu | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 dot_local/bin/executable_install-opentofu diff --git a/dot_local/bin/executable_install-opentofu b/dot_local/bin/executable_install-opentofu new file mode 100755 index 0000000..48acde3 --- /dev/null +++ b/dot_local/bin/executable_install-opentofu @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# shellcheck disable=SC1091 +source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh" + +APP=opentofu +VERSION=${VERSION:-1.12.6} +DEST=${XDG_DATA_HOME}/apps/releases/${APP} + +main() ( + URL=https://github.com/opentofu/opentofu/releases/download/v${VERSION}/tofu_${VERSION}_$(get_os)_$(get_arch).tar.gz + + extract_tarball "${URL}" "${DEST}/${VERSION}" + set_current_link "${DEST}" "${VERSION}" + set_link "${XDG_BIN_HOME}/tofu" "${DEST}" tofu +) + +main "${@}"