21 lines
419 B
Bash
21 lines
419 B
Bash
#!/bin/bash
|
|
|
|
echo "Updating AUR..."
|
|
|
|
YAY_FLAGS="--noconfirm --answerdiff=None --answeredit=None --answerclean=None"
|
|
|
|
if ! yay -Sua $YAY_FLAGS 2>/dev/null; then
|
|
echo "yay -Sua returned an error. Let's rebuild YAY."
|
|
sudo pacman -R yay
|
|
cd /tmp
|
|
git clone https://aur.archlinux.org/yay.git
|
|
cd yay
|
|
makepkg -si
|
|
cd ..
|
|
rm -rf yay
|
|
cd
|
|
yay -Sua $YAY_FLAGS
|
|
else
|
|
echo "AUR up to date."
|
|
fi
|