dotfiles/sbin/pacman-refresh-mirrorlist

6 lines
328 B
Plaintext
Raw Permalink Normal View History

2017-03-31 13:54:00 +02:00
#!/bin/bash
Cnt="Germany";
awk -v GG=$Cnt '{if(match($0,GG) != "0")AA="1";if(AA == "1"){if( length($2) != "0" )print substr($0,2) ;else AA="0"} }' /etc/pacman.d/mirrorlist.pacnew > /etc/pacman.d/mirrorlist.germany
rankmirrors -n 6 /etc/pacman.d/mirrorlist.germany > /etc/pacman.d/mirrorlist
rm /etc/pacman.d/mirrorlist.germany