diff --git a/bin/omarchy-update-aur-pkgs b/bin/omarchy-update-aur-pkgs new file mode 100755 index 00000000..2f47dbc7 --- /dev/null +++ b/bin/omarchy-update-aur-pkgs @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +# Update AUR packages if any are installed +if pacman -Qem >/dev/null; then + if omarchy-pkg-aur-accessible; then + echo -e "\e[32m\nUpdate AUR packages\e[0m" + yay -Sua --noconfirm --ignore gcc14,gcc14-libs + echo + else + echo -e "\e[31m\nAUR is unavailable (so skipping updates)\e[0m" + echo + fi +fi + +orphans=$(pacman -Qtdq || true) +if [[ -n $orphans ]]; then + echo -e "\e[32m\nRemove orphan system packages\e[0m" + for pkg in $orphans; do + sudo pacman -Rs --noconfirm "$pkg" || true + done + echo +fi diff --git a/bin/omarchy-update-perform b/bin/omarchy-update-perform index c4fcc2cb..afdf64a0 100755 --- a/bin/omarchy-update-perform +++ b/bin/omarchy-update-perform @@ -14,6 +14,7 @@ omarchy-update-keyring omarchy-update-available-reset omarchy-update-system-pkgs omarchy-migrate +omarchy-update-aur-pkgs omarchy-hook post-update omarchy-update-analyze-logs diff --git a/bin/omarchy-update-system-pkgs b/bin/omarchy-update-system-pkgs index 814fb491..b8aaf6e0 100755 --- a/bin/omarchy-update-system-pkgs +++ b/bin/omarchy-update-system-pkgs @@ -5,18 +5,6 @@ set -e echo -e "\e[32m\nUpdate system packages\e[0m" sudo pacman -Syyu --noconfirm -# Update AUR packages if any are installed -if pacman -Qem >/dev/null; then - if omarchy-pkg-aur-accessible; then - echo -e "\e[32m\nUpdate AUR packages\e[0m" - yay -Sua --noconfirm --ignore gcc14,gcc14-libs - echo - else - echo -e "\e[31m\nAUR is unavailable (so skipping updates)\e[0m" - echo - fi -fi - orphans=$(pacman -Qtdq || true) if [[ -n $orphans ]]; then echo -e "\e[32m\nRemove orphan system packages\e[0m"