1
0
Fork 0
mirror of synced 2024-12-22 16:18:59 -05:00
garuda-common-settings/usr/bin/update
2021-06-28 16:27:44 +02:00

17 lines
669 B
Bash
Executable file

#!/bin/bash
# Refresh mirrorlist
echo "Refreshing mirrorlists.."
sudo reflector --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist && cat /etc/pacman.d/mirrorlist
echo ""
# Check for keyring update & update as needed
echo "Checking for keyring update, then update as needed.."
if pacman -Qs blackarch-keyring; then
sudo pacman -Sy archlinux-keyring blackarch-keyring chaotic-keyring --needed && paru -Su
else sudo pacman -Sy archlinux-keyring chaotic-keyring --needed && paru -Su
fi
echo ""
# Update mlocate index
pacman -Qs mlocate > /dev/null && echo "Updating mlocate index.." && sudo updatedb
echo "System updated!"