mirror of
https://gitlab.com/xonotic/xonotic
synced 2024-12-15 03:15:33 +00:00
mirrorselection: handle errors better
This commit is contained in:
parent
23ce867aa1
commit
34f72cabfb
4
all
4
all
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user