Skip to content

Instantly share code, notes, and snippets.

@muhamadazmy
Created August 27, 2019 08:38
Show Gist options
  • Save muhamadazmy/6dfc7dee2ee0fc248d9eb24693dc48ad to your computer and use it in GitHub Desktop.
Save muhamadazmy/6dfc7dee2ee0fc248d9eb24693dc48ad to your computer and use it in GitHub Desktop.
Update arch linux mirrors
#!env sh
# this file depends on rankmirrors package
tmp=$(mktemp)
trap "rm -f ${tmp}" EXIT
curl "https://www.archlinux.org/mirrorlist/?country=BE&country=FR&country=DE&country=IL&protocol=http&protocol=https&ip_version=4&use_mirror_status=on" | sed "s/#Server/Server/g" > $tmp
rankmirrors ${tmp} | sudo tee /etc/pacman.d/mirrorlist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment