All checks were successful
continuous-integration/drone/push Build is passing
23 lines
536 B
Bash
Executable file
23 lines
536 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
source ~/.asdf/asdf.sh
|
|
REQUIRED_PLUGINS=$(cat .tool-versions | cut -d \ -f 1)
|
|
INSTALLED_PLUGINS=$(asdf plugin list || echo "")
|
|
|
|
for PLUGIN in $REQUIRED_PLUGINS; do
|
|
if [[ $INSTALLED_PLUGINS =~ (^|[[:space:]])"$PLUGIN"($|[[:space:]]) ]]; then
|
|
echo "Updating $PLUGIN ASDF plugin..."
|
|
asdf plugin update $PLUGIN
|
|
echo " ...done"
|
|
else
|
|
echo "Installing $PLUGIN ASDF plugin..."
|
|
asdf plugin add $PLUGIN
|
|
echo " ...done"
|
|
fi
|
|
done
|
|
|
|
echo "Running ASDF install..."
|
|
asdf install
|
|
echo " ...done"
|