diff --git a/plugins.d/rustup.sh b/plugins.d/rustup.sh index f6c3b0f..7a075de 100755 --- a/plugins.d/rustup.sh +++ b/plugins.d/rustup.sh @@ -27,7 +27,12 @@ if hash rustup 2>/dev/null; then #check=$(echo "$check" | sed 's/Up\ to\ date/${bold}Up\ to\ dateee${reset}/g') #echo ${check/Up to date/\{greenbold\}Up to dateee\{reset\}\} #Update available - echo -e "$check" + echo -e "$check\n" + + if [[ "$check" =~ "update\ available" ]]; then + echo -e "šŸ¦€ ${underline}rustup update${reset}\n" + rustup update + fi #if [[ ! $(which rustup-init) =~ "homebrew" ]]; then # echo -e "\nšŸ¦€ ${underline}Upgrading rustup itself !${reset}\n"