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

16 lines
538 B
Bash

#!/usr/bin/env bash
{{- if or (eq .host.distro.id "darwin") (eq .host.distro.family "linux") }}
# dot_tool-versions.tmpl hash: {{ include "dot_tool-versions.tmpl" | sha256sum }}
# Required for PATHs (including logging)
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 warn 'The `$ASDF_DIR/asdf.sh` or `~/.tool-versions` file is not present'
fi
{{- end }}