dotfiles/sh/.config/sh/alias.d/yay.sh

36 lines
758 B
Bash

#!/usr/bin/env sh
# Updates your system using topgrade if it exists,
# falls back to paru or yay.
# If only pacman exists, will use that but whine about it
# Also makes yay call paru since that is the new hotness
# (or at least I want to try it)
type paru >/dev/null 2>&1 && {
# recreate the normal look of yay
alias yay="paru --bottomup"
}
syu() {
type topgrade >/dev/null 2>&1 && {
topgrade
return
}
type paru >/dev/null 2>&1 && {
paru
return
}
type yay >/dev/null 2>&1 && {
yay
return
}
type pacman >/dev/null 2>&1 && {
echo "Did not find paru, or yay installed. Updates will not be applied to aur packages."
sudo pacman -Syu
return
}
}