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 +}