]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
.gitignore: also ignore possibly Radiant-created paths
[xonotic/xonotic.git] / all
diff --git a/all b/all
index 7ec990f87f04c4dfdd8f4d26cdf0c958a5a1fea7..5db6bae96c35af01daae355f9fcb435fdfdfa9a1 100755 (executable)
--- a/all
+++ b/all
@@ -368,15 +368,28 @@ bestmirror()
 
        bestin=
        bestt=
-       for in in "$@"; do
+       for mir in "$@"; do
+               case "$mir" in
+                       *:*)
+                               in=${mir%%:*}
+                               op=${mir#*:}
+                               ;;
+                       *)
+                               in=$mir
+                               op=
+                               ;;
+               esac
                m=$pre$in$suf
                if t=`mirrorspeed "$m"`; then
-                       msg "$m -> $t ticks"
                        if [ -n "$t" ]; then
+                               t=$(($t$op)) # fudge factor
+                               msg "$m -> $t ticks ($op)"
                                if [ -z "$bestt" ] || [ "$t" -lt "$bestt" ]; then
                                        bestin=$in
                                        bestt=$t
                                fi
+                       else
+                               msg "$m -> error"
                        fi
                else
                        msg "$m -> FAIL"
@@ -489,6 +502,7 @@ case "$cmd" in
                                case "$2" in
                                        nl) ;;
                                        de) ;;
+                                       us) ;;
                                        best) ;;
                                        default) ;;
                                        *)
@@ -496,6 +510,7 @@ case "$cmd" in
                                                msg "Possible locations for the -l option:"
                                                msg "  nl (Netherlands, run by merlijn)"
                                                msg "  de (Germany, run by divVerent)"
+                                               msg "  us (United States of America, run by detrate)"
                                                msg "  best (find automatically)"
                                                msg "  default (currently nl)"
                                                exit 1
@@ -514,7 +529,7 @@ case "$cmd" in
                                newbase=`$ECHO "$base" | sed "s,://\(.*\.\)\?git.xonotic.org/,:// .git.xonotic.org/,"`
                                case "$newbase" in
                                        *\ *)
-                                               if location=`bestmirror $newbase"xonotic.git" de nl`; then
+                                               if location=`bestmirror $newbase"xonotic.git" de us nl:'*3/2'`; then # 50% malus to the NL server to not overload it too much
                                                        :
                                                else
                                                        location=current
@@ -1010,9 +1025,9 @@ case "$cmd" in
 
                binary=$1
 
-               if [ -n "$USE_GDB" ]; then
+               if [ x"$USE_GDB" = x"yes" ]; then
                        set -- gdb --args "$@"
-               elif which gdb >/dev/null 2>&1; then
+               elif [ x"$USE_GDB" != x"no" ] && which gdb >/dev/null 2>&1; then
                        set -- gdb --batch -x savecore.gdb --args "$@"
                elif which catchsegv >/dev/null 2>&1; then
                        set -- catchsegv "$@"