This commit is contained in:
deimosian 2025-03-04 02:24:45 +09:00 committed by GitHub
commit d87525bd2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 6 deletions

View File

@ -178,26 +178,27 @@ fi
# Check Arch Linux PGP Keyring before System Upgrade to prevent failure. # Check Arch Linux PGP Keyring before System Upgrade to prevent failure.
function upgrade() { function upgrade() {
sudo pacman -Sy
echo ":: Checking Arch Linux PGP Keyring..." echo ":: Checking Arch Linux PGP Keyring..."
local installedver="$(LANG= sudo pacman -Qi archlinux-keyring | grep -Po '(?<=Version : ).*')" local installedver="$(LANG= sudo pacman -Qi archlinux-keyring | grep -Po '(?<=Version : ).*')"
local currentver="$(LANG= sudo pacman -Si archlinux-keyring | grep -Po '(?<=Version : ).*')" local currentver="$(LANG= sudo pacman -Si archlinux-keyring | grep -Po '(?<=Version : ).*')"
if [ $installedver != $currentver ]; then if [ $installedver != $currentver ]; then
echo " Arch Linux PGP Keyring is out of date." echo " Arch Linux PGP Keyring is out of date."
echo " Updating before full system upgrade." echo " Updating before full system upgrade."
sudo pacman -Sy --needed --noconfirm archlinux-keyring sudo pacman -S --needed --noconfirm archlinux-keyring
else else
echo " Arch Linux PGP Keyring is up to date." echo " Arch Linux PGP Keyring is up to date."
echo " Proceeding with full system upgrade." echo " Proceeding with full system upgrade."
fi fi
if (( $+commands[yay] )); then if (( $+commands[yay] )); then
yay -Syu yay -Su
elif (( $+commands[trizen] )); then elif (( $+commands[trizen] )); then
trizen -Syu trizen -Su
elif (( $+commands[pacaur] )); then elif (( $+commands[pacaur] )); then
pacaur -Syu pacaur -Su
elif (( $+commands[aura] )); then elif (( $+commands[aura] )); then
sudo aura -Syu sudo aura -Su
else else
sudo pacman -Syu sudo pacman -Su
fi fi
} }