From de14c30c483ea6532947d5731a31fe3382319e59 Mon Sep 17 00:00:00 2001 From: Buddy Date: Fri, 14 Feb 2025 11:33:01 -0800 Subject: [PATCH] Update gotemplate version --- dot_local/bin/executable_install-gotemplate | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/dot_local/bin/executable_install-gotemplate b/dot_local/bin/executable_install-gotemplate index 1458d41..0db1708 100755 --- a/dot_local/bin/executable_install-gotemplate +++ b/dot_local/bin/executable_install-gotemplate @@ -6,21 +6,30 @@ set -euo pipefail source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh" APP=gotemplate -VERSION=${VERSION:-3.7.5} +VERSION=${VERSION:-3.12.0} DEST="${XDG_DATA_HOME}/apps/releases/${APP}" main() ( - URL=https://github.com/coveooss/gotemplate/releases/download/v${VERSION}/gotemplate_${VERSION}_$(get_os)_64-bits.zip + URL=https://github.com/coveooss/gotemplate/releases/download/v${VERSION}/gotemplate_${VERSION}_$(get_os).zip extract_zip "${URL}" "${DEST}/${VERSION}" set_current_link "${DEST}" "${VERSION}" set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}" ) + get_os() ( case $(uname -s) in - Linux*) echo linux ;; - Darwin*) echo macOS ;; + Linux*) + case $(uname -m) in + aarch64) echo linux_arm64 ;; + x86_64) echo linux_amd64 ;; + esac + ;; + + Darwin*) echo darwin_all ;; + MINGW64_NT-*) echo windows_amd64 ;; + CYGWIN_NT-*) echo windows_amd64 ;; *) echo >&2 "unsupported os: $(uname -s)" exit 1