feat: manage versions with asdf

This commit is contained in:
2021-06-22 13:05:12 +02:00
parent c7f0923ced
commit 221d8465c9
15 changed files with 124 additions and 95 deletions

16
helpers/asdf-install.sh Normal file
View File

@ -0,0 +1,16 @@
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 "${@}"

View File

@ -24,11 +24,11 @@ installOptional() {
install() {
# Check if program is already installed
if isInstalled $1; then
echo " - $1 is already installed"
echo " $1 is already installed"
else
echo " - installing $1 ..."
apt-get install $1 -y >/dev/null
echo " - finished"
echo " finished"
fi
}

View File

@ -68,9 +68,9 @@ function multiselect() {
# print options by overwriting the last lines
local idx=0
for option in "${options[@]}"; do
local prefix=" [ ]"
local prefix=" [ ]"
if [[ ${selected[idx]} == true ]]; then
prefix=" [x]"
prefix=" [x]"
fi
cursor_to $(($startrow + $idx))