mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Update AUR packages after system pkgs + migrate
As AUR packages need local compiling and that might fail. Which shouldn't prevent migrations from running.
This commit is contained in:
24
bin/omarchy-update-aur-pkgs
Executable file
24
bin/omarchy-update-aur-pkgs
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user