Last active
June 26, 2023 12:40
-
-
Save sylvainbx/69db4ec7931dbcc9e38b4767d8a10d1c to your computer and use it in GitHub Desktop.
Archlinux update script, to paste in /usr/bin and chmod u+x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
getopts 'y' YES | |
sudo paccache -rk1 | |
sudo paccache -ruk0 | |
sudo pacman -Sy archlinux-keyring && sudo pacman -Su | |
sudo pacman -Syu | |
[[ "$YES" = "y" ]] && aur="y" || read -rp "Proceed with AUR update? (y/N) " aur </dev/tty | |
if [[ "$aur" = "y" ]]; then | |
yay -Syu | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment