e2b88b553a
- /home/.chezmoiscripts/universal/run_onchange_after_14_install-aqua-packages.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-zsh-plugins.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_14-install-aqua-packages.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_15-install-asdf-packages.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_99-bootstrap-zsh-plugins.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_41-vagrant-vmware-utility.tmpl - /software.yml
25 lines
876 B
Bash
25 lines
876 B
Bash
#!/usr/bin/env bash
|
|
{{- if (ne .host.distro.family "windows") }}
|
|
|
|
# dot_tool-versions.tmpl hash: {{ include "dot_tool-versions.tmpl" | sha256sum }}
|
|
|
|
{{- includeTemplate "universal/profile" }}
|
|
{{- includeTemplate "universal/logg" }}
|
|
|
|
if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then
|
|
logg info 'Sourcing asdf.sh'
|
|
. ${ASDF_DIR}/asdf.sh
|
|
cat .tool-versions | while read TOOL; do
|
|
logg info 'Installing ASDF plugin `'"$(echo "$TOOL" | sed 's/ .*//')"'`'
|
|
asdf plugin add "$(echo "$TOOL" | sed 's/ .*//')"
|
|
done
|
|
logg info 'Installing ASDF dependencies derived from `~/.tool-versions` via `asdf install`'
|
|
asdf install || EXIT_CODE=$?
|
|
if [ -n "$EXIT_CODE" ]; then
|
|
logg error 'Error installing the ASDF plugins specified in `~/.tool-versions`'
|
|
fi
|
|
else
|
|
logg warn 'The `$ASDF_DIR/asdf.sh` or `~/.tool-versions` file is not present'
|
|
fi
|
|
|
|
{{ end -}}
|