diff --git a/bin/omarchy-update-aur-pkgs b/bin/omarchy-update-aur-pkgs new file mode 100755 index 00000000..0e5c9d53 --- /dev/null +++ b/bin/omarchy-update-aur-pkgs @@ -0,0 +1,13 @@ +#!/bin/bash + +# 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 diff --git a/bin/omarchy-update-orphan-pkgs b/bin/omarchy-update-orphan-pkgs new file mode 100755 index 00000000..3d7a3511 --- /dev/null +++ b/bin/omarchy-update-orphan-pkgs @@ -0,0 +1,10 @@ +#!/bin/bash + +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..c2101c15 100755 --- a/bin/omarchy-update-perform +++ b/bin/omarchy-update-perform @@ -14,6 +14,8 @@ omarchy-update-keyring omarchy-update-available-reset omarchy-update-system-pkgs omarchy-migrate +omarchy-update-aur-pkgs +omarchy-update-orphan-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..36a78418 100755 --- a/bin/omarchy-update-system-pkgs +++ b/bin/omarchy-update-system-pkgs @@ -4,24 +4,3 @@ 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" - for pkg in $orphans; do - sudo pacman -Rs --noconfirm "$pkg" || true - done - echo -fi