You are not logged in.
Pages: 1
Topic closed
Don't laugh at me if it is child play. I am not expert.
I just wanna share my idea to keep mirrorlist up-to-date and fastest.
It is simple and just need wget
#! /bin/bash
# I create ~/mls dir and go into there
cd /home/msh/mls
# Go to www.archlinux.org/mirrorlist and generate up-to-date mirrorlist from Australia, Japan, Korea and Vietnam using wget
# (I am in Myanmar, they are nearest to me) wget command will generate mirrorlist and save as gml.txt file in my ~/mls dir
wget -O - 'https://www.archlinux.org/mirrorlist/?country=AU&country=JP&country=KR&country=VN&protocol=http&ip_version=4' > /home/msh/mls/gml.txt
# then uncomment all the mirror lines in gml.txt file using sed
sed -i 's/^#Server/Server/' /home/msh/mls/gml.txt
# then rank them and take out five fastest mirrors using rankmirrors
rankmirrors -n 5 /home/msh/mls/gml.txt > /home/msh/mls/rml
# and then backup that rml text file including five fastest mirrors in case of need later
cp rml rml-$(date +%Y%m%d-%I:%M:%S%p)
# at last sent that rml text file including five fastest mirrors to /etc/pacman.d/mirrorlist
echo password | sudo -S cp /home/msh/mls/rml /etc/pacman.d/mirrorlist
# eventually go back to home and sit back
cd /home/msh
I save this script as .genml in my home directory and excute it when I want to update mirrorlist.
It works perfectly.
just sharing my idea, not codes like an expert.
Last edited by mshan (2014-06-16 16:50:51)
Amazing !
Offline
"reflector" in community is a much more general solution.
Offline
Offline
yes, I know.
but my idea doesn't need to install any more package other than wget which is already installed as my downloader.
more package is more MB when I run "pacman -Syu".
I stay in the country (Myanmar, Asia) with the slowest internet connection in the world.
I don't want any more package for just a single task.
Amazing !
Offline
Unless you would have install python just for this one package, reflector alone doesn't weight a lot: 14 KB.
Offline
just now, I run "pacman -S reflector" and see how many MB do I need to download.
it says 15.38 MB. oh!
So, I cancel installation by pressing "n" and enter.
yes, I don't have paython installed. That's why download size is a little bit big.
I don't want it.
Currently I am using Arch with ratpoison or openbox (sometimes)
They are my favorite WMs because too small and easy.
Last edited by mshan (2014-06-16 17:16:52)
Amazing !
Offline
Great script, thanks for making it.
Offline
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed