Update .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl

This commit is contained in:
Brian Zalewski 2022-12-05 06:45:53 +00:00
parent 80ef19dc3e
commit c9c27045d5

View file

@ -7,8 +7,13 @@
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}
if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then
logg 'Installing ASDF dependencies derived from `~/.tool-versions`' logg info 'Sourcing asdf.sh'
. ${ASDF_DIR}/asdf.sh . ${ASDF_DIR}/asdf.sh
cat .tool-versions | while read TOOL; do
logg info 'Installing ASDF plugin `'"$TOOL"'`'
asdf plugin add "$(echo "$TOOL" | sed 's/ .*//')"
done
logg info 'Installing ASDF dependencies derived from `~/.tool-versions` via `asdf install`'
asdf install || true asdf install || true
else else
logg warn 'The `$ASDF_DIR/asdf.sh` or `~/.tool-versions` file is not present' logg warn 'The `$ASDF_DIR/asdf.sh` or `~/.tool-versions` file is not present'