.dotfiles/helpers/asdf-install.sh

17 lines
422 B
Bash

asdfInstall(){
. "$HOME/.asdf/asdf.sh"
if [ "$(which asdf)" = "" ]; then
echo "Asdf not installed"
else
echo "-------------- ASDF install ------------------"
echo "-- $1"
asdf plugin add $1
asdf install $1 latest
asdf global $1 latest
echo "----------------------------------------------"
fi
}
[[ "${1}" != "--source-only" ]] && asdfInstall "${@}"