change to update format
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Updating AUR..."
|
||||
|
||||
YAY_FLAGS="--noconfirm --answerdiff=None --answeredit=None --answerclean=None"
|
||||
|
||||
# Only rebuild yay when yay itself is broken (e.g. a pacman upgrade bumped
|
||||
# libalpm). A failing AUR package is not fixed by a rebuild, so let that error
|
||||
# show and fail the hook instead.
|
||||
if ! yay --version &>/dev/null; then
|
||||
echo "yay is broken (likely a libalpm bump). Rebuilding yay..."
|
||||
sudo pacman -R --noconfirm yay
|
||||
cd /tmp
|
||||
rm -rf yay
|
||||
git clone https://aur.archlinux.org/yay.git
|
||||
cd yay
|
||||
makepkg -si --noconfirm
|
||||
cd ..
|
||||
rm -rf yay
|
||||
cd
|
||||
fi
|
||||
|
||||
yay -Sua $YAY_FLAGS
|
||||
Reference in New Issue
Block a user