Stop yay from asking so many questions

This commit is contained in:
2026-01-09 23:22:02 +01:00
parent 2984ef9193
commit 8cdba1906f

View File

@@ -14,12 +14,12 @@ if ! which yay >/dev/null 2>&1; then
cd .. cd ..
rm -fr yay rm -fr yay
fi fi
yay -Syu --needed curl git neovim pacman-contrib yaycache yay -Syu --needed --noconfirm curl git neovim pacman-contrib yaycache
[ ! -e /usr/local/bin/vim ] && sudo ln -s /usr/bin/nvim /usr/local/bin/vim [ ! -e /usr/local/bin/vim ] && sudo ln -s /usr/bin/nvim /usr/local/bin/vim
# Backup system # Backup system
if which btrfs >/dev/null; then if which btrfs >/dev/null; then
yay -Syu --needed snapper yay -Syu --needed --noconfirm snapper
[ ! -f /etc/snapper/configs/root ] && sudo snapper -c root create-config / [ ! -f /etc/snapper/configs/root ] && sudo snapper -c root create-config /
[ ! $(sudo awk -F '"' '/NUMBER_LIMIT=/ {print $2}' /etc/snapper/configs/root) -eq $BACKUP_LIMIT ] && sudo sed -i.bak "s/\(NUMBER_LIMIT=\"\).*\"/\1$BACKUP_LIMIT\"/" /etc/snapper/configs/root [ ! $(sudo awk -F '"' '/NUMBER_LIMIT=/ {print $2}' /etc/snapper/configs/root) -eq $BACKUP_LIMIT ] && sudo sed -i.bak "s/\(NUMBER_LIMIT=\"\).*\"/\1$BACKUP_LIMIT\"/" /etc/snapper/configs/root
@@ -33,12 +33,12 @@ curl -s 'https://archlinux.org/mirrorlist/?country=DE&protocol=https&use_mirror_
# Update system # Update system
echo -e '\nUpdating system ...' >&2 echo -e '\nUpdating system ...' >&2
yay -Syu yay -Syu --noconfirm
# Remove orphans # Remove orphans
echo -e '\nRemoving orphans ...' >&2 echo -e '\nRemoving orphans ...' >&2
orphans=$(yay -Qtdq) orphans=$(yay -Qtdq)
[ ! "X$orphans" = 'X' ] && yay -Rns $orphans [ ! "X$orphans" = 'X' ] && yay -Rns --noconfirm $orphans
# Clean cache # Clean cache
echo -e '\nCleaning cache ...' >&2 echo -e '\nCleaning cache ...' >&2