aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/update-mirrorlist.sh
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/update-mirrorlist.sh')
-rwxr-xr-x.local/bin/update-mirrorlist.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/.local/bin/update-mirrorlist.sh b/.local/bin/update-mirrorlist.sh
new file mode 100755
index 0000000..958c194
--- /dev/null
+++ b/.local/bin/update-mirrorlist.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Update mirrorlist
+
+export TMPFILE=$(mktemp)
+
+sudo true # Force password prompt in the beginning
+rate-arch-mirrors --max-delay=21600 --entry-country=BY | tee -a $TMPFILE
+sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-backup
+sudo mv $TMPFILE /etc/pacman.d/mirrorlist