Skip to content

Instantly share code, notes, and snippets.

@tamsanh
Last active February 23, 2023 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tamsanh/b9fad8c42756ed4d890a9e215dd46960 to your computer and use it in GitHub Desktop.
Save tamsanh/b9fad8c42756ed4d890a9e215dd46960 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Setup based on .tool-version in the current directory
while read package; do
plugin=${package%% *}
version=${package#* }
printf "Checking ${package}... "
asdf list $plugin | grep $version >/dev/null 2>/dev/null
if [ $? -ne 0 ]; then
asdf plugin add $plugin
asdf install $plugin $version
else
echo "Ok"
fi
done < .tool-versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment