Simplify guard against an unavailable AUR

This commit is contained in:
David Heinemeier Hansson
2025-08-24 17:41:41 +02:00
parent 673cea1644
commit f1af28f10d
5 changed files with 16 additions and 40 deletions

View File

@@ -1,9 +1,18 @@
#!/bin/bash
echo -e "\e[32m\nUpdate system packages\e[0m"
yay -Syu --noconfirm
sudo pacman -Syu --noconfirm
echo
if omarchy-pkg-aur-accessible; then
echo -e "\e[32m\nUpdate AUR packages\e[0m"
yay -Syu --noconfirm
echo
else
echo -e "\e[31m\nAUR is unavailable, skipping updates\e[0m"
echo
fi
echo -e "\e[32m\nRemove orphan system packages\e[0m"
sudo pacman -Rs $(pacman -Qtdq)
echo