|
|
@ -2,7 +2,7 @@ |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: lib/sde-download/mirror-test.sh |
|
|
|
# Copyright (C) 2006 - 2010 The OpenSDE Project |
|
|
|
# Copyright (C) 2006 - 2012 The OpenSDE Project |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# |
|
|
@ -47,9 +47,8 @@ while read name country admin url ; do |
|
|
|
|
|
|
|
# test |
|
|
|
echo -n "Testing <$name> ($country) ..." 1>&2 |
|
|
|
speed="$(curl -s -m 20 "$url/DOWNTEST" -w "%{speed_download}" -o /dev/null | |
|
|
|
sed -e 's:,:.:' -e 's:[\.,]...$::' )" |
|
|
|
|
|
|
|
speed=$(curl -s -m 20 "$url/DOWNTEST" -w "%{http_code} %{speed_download}" -o /dev/null | |
|
|
|
grep '^200 ' | cut -d' ' -f2- | sed -e 's:,:.:' -e 's:[\.,]...$::') |
|
|
|
# compare |
|
|
|
if [ "${speed:-0}" = "0" ]; then |
|
|
|
echo ' failed' 1>&2 |
|
|
|