scripts: testing rustup in update-all

This commit is contained in:
Andrew Scott 2024-10-06 00:48:23 -04:00
parent 990a1bfc2d
commit bd096b28be
Signed by: a
GPG key ID: 7CD5A5977E4931C1

View file

@ -11,8 +11,12 @@ alias zigup='zigup --install-dir "${HOME}/.local/share/zigup" --path-link "${HOM
updates=$(checkupdates) updates=$(checkupdates)
aur_updates=$(paru -Qua) 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." echo "System is already up to date."
exit 0 exit 0
fi fi
@ -20,6 +24,13 @@ fi
river_has_update=$(echo "$aur_updates" | grep -c 'river-git') river_has_update=$(echo "$aur_updates" | grep -c 'river-git')
zls_has_update=$(echo "$aur_updates" | grep -c 'zls-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 if [ "$river_has_update" -ne 0 ] && [ "$zls_has_update" -ne 0 ]; then
zigup 0.13.0 zigup 0.13.0
paru -Syu river-git --ignore zls-git paru -Syu river-git --ignore zls-git