diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index e20a31156..a4720a90f 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -181,7 +181,8 @@ function upgrade() { echo ":: Checking Arch Linux PGP Keyring..." local installedver="$(LANG= sudo pacman -Qi archlinux-keyring | grep -Po '(?<=Version : ).*')" local currentver="$(LANG= sudo pacman -Si archlinux-keyring | grep -Po '(?<=Version : ).*')" - if [ $installedver != $currentver ]; then + + if ! printf '%s\n' "$currentver" "$installedver" | sort -VC; then echo " Arch Linux PGP Keyring is out of date." echo " Updating before full system upgrade." sudo pacman -Sy --needed --noconfirm archlinux-keyring @@ -189,6 +190,7 @@ function upgrade() { echo " Arch Linux PGP Keyring is up to date." echo " Proceeding with full system upgrade." fi + if (( $+commands[yay] )); then yay -Syu elif (( $+commands[trizen] )); then