Last active
February 23, 2023 20:59
-
-
Save tamsanh/b9fad8c42756ed4d890a9e215dd46960 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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