Browse Source

sde-download: allow redirects when probing mirrors

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 5 years ago
parent
commit
d2d683b161
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/sde-download/mirror-test.sh

+ 1
- 1
lib/sde-download/mirror-test.sh

@ -47,7 +47,7 @@ while read name country admin url ; do
# test # test
echo -n "Testing <$name> ($country) ..." 1>&2 echo -n "Testing <$name> ($country) ..." 1>&2
speed=$(curl -s -m 20 "$url/DOWNTEST" -w "%{http_code} %{speed_download}" -o /dev/null |
speed=$(curl -Ls -m 20 "$url/DOWNTEST" -w "%{http_code} %{speed_download}" -o /dev/null |
grep '^200 ' | cut -d' ' -f2- | sed -e 's:,:.:' -e 's:[\.,]...$::') grep '^200 ' | cut -d' ' -f2- | sed -e 's:,:.:' -e 's:[\.,]...$::')
# compare # compare
if [ "${speed:-0}" = "0" ]; then if [ "${speed:-0}" = "0" ]; then

Loading…
Cancel
Save