mirror of https://github.com/ohmyzsh/ohmyzsh.git
Merge 6394b6e6b7
into 30e516a3aa
This commit is contained in:
commit
d87525bd2d
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue