From bd096b28be2865f6af90dd69d7a246b540fcc88d Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Sun, 6 Oct 2024 00:48:23 -0400 Subject: [PATCH] scripts: testing `rustup` in `update-all` --- dot_local/bin/executable_update-all | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dot_local/bin/executable_update-all b/dot_local/bin/executable_update-all index c60b4bc..7c6b2fc 100644 --- a/dot_local/bin/executable_update-all +++ b/dot_local/bin/executable_update-all @@ -11,8 +11,12 @@ alias zigup='zigup --install-dir "${HOME}/.local/share/zigup" --path-link "${HOM updates=$(checkupdates) aur_updates=$(paru -Qua) +rust_has_update=$(rustup check | grep -c 'Update') -if [ "$updates" = "" ] && [ "$aur_updates" = "" ]; then +if [ "$updates" = "" ] \ + && [ "$aur_updates" = "" ] \ + && [ "$rust_has_update" -eq 0 ]; +then echo "System is already up to date." exit 0 fi @@ -20,6 +24,13 @@ fi river_has_update=$(echo "$aur_updates" | grep -c 'river-git') zls_has_update=$(echo "$aur_updates" | grep -c 'zls-git') + +if [ "$rust_has_update" -ne 0 ]; then + rustup update +else + echo "$rust_has_update" +fi + if [ "$river_has_update" -ne 0 ] && [ "$zls_has_update" -ne 0 ]; then zigup 0.13.0 paru -Syu river-git --ignore zls-git