aboutsummaryrefslogtreecommitdiff
path: root/scripts/update-mirrors.sh
blob: 4fa9a50fef66b87af8b728e1060f081467a80e84 (plain)
1
2
3
4
5
6
#!/usr/bin/env bash

countrys="country=CN"

sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
curl -s "https://archlinux.org/mirrorlist/?$countrys&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - | sudo tee /etc/pacman.d/mirrorlist