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

18 lines
669 B
Text
Raw Normal View History

#!/bin/bash
# Refresh mirrorlist
2021-06-27 04:36:44 -04:00
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
2021-06-27 04:36:44 -04:00
echo ""
# Check for keyring update & update as needed
2021-06-27 04:36:44 -04:00
echo "Checking for keyring update, then update as needed.."
2021-06-26 14:16:50 -04:00
if pacman -Qs blackarch-keyring; then
2021-06-28 10:27:44 -04:00
sudo pacman -Sy archlinux-keyring blackarch-keyring chaotic-keyring --needed && paru -Su
else sudo pacman -Sy archlinux-keyring chaotic-keyring --needed && paru -Su
2021-06-26 14:16:50 -04:00
fi
2021-06-27 04:36:44 -04:00
echo ""
# Update mlocate index
2021-06-27 04:36:44 -04:00
pacman -Qs mlocate > /dev/null && echo "Updating mlocate index.." && sudo updatedb
echo "System updated!"