From 0f1b8e63bc890fde8ebb448abb7fbdce36a42aae Mon Sep 17 00:00:00 2001 From: datalore Date: Sat, 27 Jul 2024 19:07:07 +0200 Subject: [PATCH] Added utility script to sort mirrors by speed --- fastestmirror.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 fastestmirror.sh diff --git a/fastestmirror.sh b/fastestmirror.sh new file mode 100644 index 0000000..b760b9e --- /dev/null +++ b/fastestmirror.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +data="" +for s in $(wget -qO- https://mirrors.alpinelinux.org/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