aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/update-mirrors.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/update-mirrors.sh b/scripts/update-mirrors.sh
new file mode 100755
index 0000000..4fa9a50
--- /dev/null
+++ b/scripts/update-mirrors.sh
@@ -0,0 +1,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