sh: Switch yay to paru
Removed outdated `syu` symlink which just hooks into topgrade. Replaced it with simple function that tries for topgrade, paru, yay, pacman, in that order. Can still be invoked with simple `syu` command, but *only* through interactive terminal use. Switched git pre-commit hook to default to paru instead of yay when compiling installed package lists for dotfile commits.
This commit is contained in:
parent
d2e44d330d
commit
8cb3252cf1
4 changed files with 38 additions and 5 deletions
34
sh/.config/sh/alias.d/syu.sh
Normal file
34
sh/.config/sh/alias.d/syu.sh
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#!/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 && {
|
||||
alias yay=paru
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue