mirrorselection: handle errors better

This commit is contained in:
Rudolf Polzer 2011-04-02 13:02:16 +02:00 committed by Rudolf Polzer
parent 23ce867aa1
commit 34f72cabfb

4
all
View File

@ -379,6 +379,7 @@ bestmirror()
suf=$1; shift
if ! { time -p true; } >/dev/null 2>&1; then
msg "Cannot do timing in this shell"
return 1
fi
@ -546,7 +547,6 @@ case "$cmd" in
case "$location" in
current)
if [ x"`git config xonotic.all.mirrorselection 2>/dev/null || true`" != x"done" ]; then
git config xonotic.all.mirrorselection done
location=best
fi
;;
@ -564,7 +564,7 @@ case "$cmd" in
case "$newbase" in
*\ *)
if location=`bestmirror $newbase"xonotic.git" de us nl:'*6/5'`; then # 20% malus to the NL server to not overload it too much
:
git config xonotic.all.mirrorselection done
else
location=current
fi