Skip to content

Instantly share code, notes, and snippets.

@sylvainbx
Last active June 26, 2023 12:40
Show Gist options
  • Save sylvainbx/69db4ec7931dbcc9e38b4767d8a10d1c to your computer and use it in GitHub Desktop.
Save sylvainbx/69db4ec7931dbcc9e38b4767d8a10d1c to your computer and use it in GitHub Desktop.
Archlinux update script, to paste in /usr/bin and chmod u+x
#!/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