-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmirror-select
More file actions
executable file
·38 lines (35 loc) · 1.28 KB
/
mirror-select
File metadata and controls
executable file
·38 lines (35 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
FEDORAS="$FEDORAS http://ftp.fi.muni.cz/pub/linux/fedora/linux"
FEDORAS="$FEDORAS http://ftp.sh.cvut.cz/"
FEDORAS="$FEDORAS http://mirror.karneval.cz/pub/linux/fedora/linux"
FEDORAS="$FEDORAS http://mirror.slu.cz/fedora/linux"
FEDORAS="$FEDORAS http://mirrors.nic.cz/fedora/linux"
FEDORAS="$FEDORAS http://mirror.vutbr.cz/fedora"
EPELS="$EPELS http://ftp.fi.muni.cz/pub/linux/fedora/epel"
EPELS="$EPELS http://mirror.hosting90.cz/epel"
EPELS="$EPELS http://mirror.karneval.cz/pub/linux/fedora/epel"
EPELS="$EPELS http://mirror.slu.cz/epel"
EPELS="$EPELS http://mirrors.nic.cz/epel"
EPELS="$EPELS http://mirror.vutbr.cz/epel"
test_sites() {
MAXTIME="$1"
SITES="$2"
URLSUFFIX="$3"
for SITE in $SITES; do
echo -n "$SITE "
V=$(/bin/time --format "%esec" curl -m $MAXTIME --fail --silent -o /dev/null "${SITE}${URLSUFFIX}" 2>&1)
if [[ $? = 0 ]]; then
echo "$V"
else
echo "FAILED after $V"
fi
done
}
echo "== Fedora =="
test_sites 2 "$FEDORAS" | sort -n -k 2
echo "== Fedora file =="
test_sites 12 "$FEDORAS" "/releases/26/Workstation/x86_64/os/EFI/BOOT/BOOTX64.EFI" | sort -n -k 2
echo "== Epel =="
test_sites 2 "$EPELS" | sort -n -k 2
echo "== Epel file =="
test_sites 12 "$EPELS" "/fullfilelist" | sort -n -k 2