Bump templ version
parent
30574711c3
commit
bbe64105e4
@ -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
|
||||
}
|
Loading…
Reference in New Issue