2019-07-23 15:54:26 +00:00
|
|
|
### ASDF
|
|
|
|
# install multiple languages at once, async
|
|
|
|
# mnemonic [V]ersion [M]anager [I]nstall
|
|
|
|
|
|
|
|
lang=${1}
|
|
|
|
asdf plugin-list-all &>/dev/null 2>&1
|
|
|
|
|
|
|
|
if [[ -z $lang ]]; then
|
2019-12-28 15:28:55 +00:00
|
|
|
lang=$(asdf plugin-list all | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[asdf:install]'" | awk '{print $1}')
|
2019-07-23 15:54:26 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ $lang ]]; then
|
|
|
|
for lng in $(echo $lang); do
|
|
|
|
if [[ -z $(asdf plugin-list | rg $lng) ]]; then
|
|
|
|
asdf plugin-add $lng
|
|
|
|
else
|
|
|
|
asdf plugin-update $lng
|
|
|
|
fi
|
|
|
|
|
2019-08-11 15:47:35 +00:00
|
|
|
for version in $(asdf list-all $lng | sort -nrk1,1 | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[asdf:${lng}:install]'"); do
|
|
|
|
asdf install $lng $version
|
2019-07-23 15:54:26 +00:00
|
|
|
done
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|