Created
March 2, 2022 23:30
-
-
Save luluco250/e9f8a184a099ad6d4fdb984e82f91d09 to your computer and use it in GitHub Desktop.
Script to update pacman mirrors using reflector
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 | |
[[ $(id -u) > 0 ]] && echo 'Error: Needs to be run as root.' && exit 1 | |
reflector \ | |
--country 'Brazil,Canada,Chile,Colombia,Ecuador,Mexico,Paraguay,United States' \ | |
--fastest 10 \ | |
--protocol https \ | |
--sort rate \ | |
--threads $(nproc) \ | |
--save /etc/pacman.d/mirrorlist && \ | |
pacman -Syyu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment