Compare commits

..

2 Commits

Author SHA1 Message Date
Buddy
d4ab3a2f1c Merge branch 'main' of git.buddy.wtf:buddy/dot-files 2026-10-04 11:31:06 -07:00
Buddy
ce26a8bfaa feat: add install script for opentofu 2026-09-29 11:18:38 -07:00

View File

@ -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 "${@}"