42 lines
988 B
Cheetah
42 lines
988 B
Cheetah
#!{{ lookPath "bash" }}
|
|
|
|
# include lib
|
|
. ${CHEZMOI_WORKING_TREE}/scripts/utils.sh
|
|
. ${HOME}/.asdf/asdf.sh
|
|
|
|
|
|
# Plugins to install
|
|
declare -A plugins
|
|
plugins=(
|
|
['direnv']=''
|
|
['golang']='https://github.com/asdf-community/asdf-golang.git'
|
|
['nodejs']='https://github.com/asdf-vm/asdf-nodejs.git'
|
|
['opam']='https://github.com/asdf-community/asdf-opam.git'
|
|
['ruby']='https://github.com/asdf-vm/asdf-ruby.git'
|
|
['rust']='https://github.com/code-lever/asdf-rust.git'
|
|
['starship']=''
|
|
)
|
|
|
|
|
|
### Install ASDF plugins ###
|
|
log "Begin ASDF plugins installation"
|
|
|
|
inf "installing direnv with system version..."
|
|
# no need to run asdf direnv setup --shell zsh --version latest
|
|
# as it is managed by zim module
|
|
asdf plugin-add direnv
|
|
|
|
for plugin in ${!plugins[@]}; do
|
|
inf "installing ${plugin}..."
|
|
|
|
asdf plugin add ${plugin} ${plugins[$plugin]}
|
|
asdf install ${plugin} latest
|
|
asdf global ${plugin} latest
|
|
done
|
|
|
|
inf "initializing opam..."
|
|
opam init
|
|
|
|
log "Finish ASDF plugins installation"
|
|
|