From bbe64105e40da49b47006d428704ea0d7843957e Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Mon, 14 Oct 2024 16:07:49 -0700 Subject: [PATCH] Bump templ version --- dot_local/bin/executable_install-templ | 2 +- dot_local/share/buddy/include.bash | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 dot_local/share/buddy/include.bash diff --git a/dot_local/bin/executable_install-templ b/dot_local/bin/executable_install-templ index 800d6b9..1efa0e8 100755 --- a/dot_local/bin/executable_install-templ +++ b/dot_local/bin/executable_install-templ @@ -6,7 +6,7 @@ set -euo pipefail source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh" APP=templ -VERSION=${VERSION:-v0.2.747} +VERSION=${VERSION:-v0.2.778} DEST=${XDG_DATA_HOME}/apps/releases/${APP} URL=https://github.com/a-h/templ/releases/download/${VERSION}/templ_$(uname)_$(uname -m).tar.gz diff --git a/dot_local/share/buddy/include.bash b/dot_local/share/buddy/include.bash new file mode 100644 index 0000000..4b56248 --- /dev/null +++ b/dot_local/share/buddy/include.bash @@ -0,0 +1,26 @@ +if [ -v _LOADED_LIBS ]; then + return +fi + +_LOADED_LIBS=() + +include() { + local file + local previous + for file in "${@}"; do + for previous in "${_LOADED_LIBS[@]}"; do + if [[ "${previous}" == "${file}" ]]; then + continue 2 + fi + done + + _LOADED_LIBS+=("$file") + if [[ -f "${XDG_DATA_HOME}/buddy/lib/$file.bash" ]]; then + # shellcheck disable=SC1090 + source "${XDG_DATA_HOME}/buddy/lib/${file}.bash" + else + >&2 echo "unknown: ${file}" + exit 1 + fi + done +}