1
0
Fork 0
mirror of synced 2024-11-18 16:15:36 -05:00
garuda-common-settings/usr/bin/update

17 lines
556 B
Text
Raw Normal View History

#!/bin/bash
# Refresh mirrorlist
sudo reflector --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist && cat /etc/pacman.d/mirrorlist
# Check for keyring update & update as needed
if "/usr/bin/checkupdates" | grep chaotic-keyring; then
sudo pacman -Sy chaotic-keyring && sudo pacman -Su
elif "/usr/bin/checkupdates" | grep archlinux-keyring; then
sudo pacman -Sy archlinux-keyring && sudo pacman -Su
else sudo pacman -Syu
# Update fish autocompletions
fish_update_completions
# Update mlocate index
sudo updatedb