From 6790824452077d3e6d7944ec6f5fe8a616d5eec9 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Fri, 1 Mar 2024 14:25:34 +0100 Subject: [PATCH] Up. --- ...onchange_after_30-install-devtools.sh.tmpl | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 home/.chezmoiscripts/run_onchange_after_30-install-devtools.sh.tmpl diff --git a/home/.chezmoiscripts/run_onchange_after_30-install-devtools.sh.tmpl b/home/.chezmoiscripts/run_onchange_after_30-install-devtools.sh.tmpl new file mode 100644 index 0000000..e9659c8 --- /dev/null +++ b/home/.chezmoiscripts/run_onchange_after_30-install-devtools.sh.tmpl @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Load asdf +. "$HOME/.asdf/asdf.sh" + +# Logging function +log() { + printf "$(tput setaf 4)$(tput bold)>>>>> %s <<<<<$(tput sgr0)\n" "$1" +} + +inf() { + printf "$(tput sgr 0 1)$(tput setaf 2)%s$(tput sgr0)\n" "$1" +} + + + +# Plugins to install +declare -A plugins +plugins=( + ['golang']='https://github.com/asdf-community/asdf-golang.git' +) + + + +### Install ASDF plugins ### +log "Begin ASDF plugins installation" + +for plugin in ${!plugins[@]}; do + inf "installing ${plugin}..." + + asdf plugin add ${plugin} ${plugins[$plugin]} +done + +log "Finish ASDF plugins installation" +