Finding the fastest mirror: Difference between revisions
m (remove L and /tmp dir) |
(cleanup broken script) |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
After you install Alpine, you may be wondering how do I figure out the fastest mirror again? | After you install Alpine, you may be wondering how do I figure out the fastest mirror again? | ||
You could run <code>/sbin/setup-apkrepos</code> again. | |||
The following script shows the closest mirror for a single ping, which might not be accurate: | |||
{{Cat|/home/user/fastestmirror|<nowiki> | {{Cat|/home/user/fastestmirror|<nowiki> | ||
Line 13: | Line 17: | ||
echo -e $data | sort | echo -e $data | sort | ||
</nowiki>}} | </nowiki>}} | ||
[[Category:Package Manager]] |
Revision as of 07:09, 10 January 2023
After you install Alpine, you may be wondering how do I figure out the fastest mirror again?
You could run /sbin/setup-apkrepos
again.
The following script shows the closest mirror for a single ping, which might not be accurate:
Contents of /home/user/fastestmirror
data=""
for s in $(wget -qO- http://rsync.alpinelinux.org/alpine/MIRRORS.txt); do
t=$(time -f "%E" wget -q $s/MIRRORS.txt -O /dev/null 2>&1)
echo "$s was $t"
data="$data$t $s\n"
done
echo "===RESULTS==="
echo -e $data | sort