feat: manage versions with asdf
This commit is contained in:
16
helpers/asdf-install.sh
Normal file
16
helpers/asdf-install.sh
Normal 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 "${@}"
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
|
Reference in New Issue
Block a user