install.fairie/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl

17 lines
534 B
Cheetah

{{- if or (eq .host.distro.id "darwin") (eq .host.distro.family "linux") }}
#!/usr/bin/env bash
{{- includeTemplate "universal/logg" }}
# dot_tool-versions.tmpl hash: {{ include "dot_tool-versions.tmpl" | sha256sum }}
source "$HOME/.config/shell/exports"
if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then
logg 'Installing ASDF dependencies derived from `~/.tool-versions`'
. ${ASDF_DIR}/asdf.sh
asdf install || true
else
logg 'The `$ASDF_DIR/asdf.sh` or `~/.tool-versions` file is not present'
fi
{{- end -}}