]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/all/config.subr
Try to become able to use a time builtin again. Fixes timing on msys.
[xonotic/xonotic.git] / misc / tools / all / config.subr
index 4060a017cbdb1d435a827893cc5075693aa07dcb..38a90bde0b7b0d532bd94e39f476712f02306f50 100644 (file)
@@ -12,7 +12,9 @@ allrepos()
        "$@" d0_blind_id                   d0_blind_id.git              master         ""
        "$@" data/xonotic-maps.pk3dir      xonotic-maps.pk3dir.git      master         ""
        "$@" mediasource                   mediasource.git              master         "no"
-       "$@" fteqcc                        fteqcc.git                   xonotic-stable "noautocrlf"
+       "$@" gmqcc                         gmqcc.git                    master         ""
+       "$@" xonstat                       xonstat.git                  master         "no"
+       "$@" xonstatdb                     xonstatdb.git                master         "no"
 }
 
 allmirrors()
@@ -21,8 +23,8 @@ allmirrors()
        "$@" http ''   http://git.xonotic.org/xonotic/     ''
        "$@" ssh  ''   ssh://xonotic@git.xonotic.org/      ''
 
-       "$@" git  us   git://us.git.xonotic.org/xonotic/   ''
-       "$@" http us   http://us.git.xonotic.org/xonotic/  ''
+       "$@" git  us   git://us.git.xonotic.org/xonotic/   '*2/3'
+       "$@" http us   http://us.git.xonotic.org/xonotic/  '*2/3'
 
        "$@" git  de   git://de.git.xonotic.org/xonotic/   ''
        "$@" http de   http://de.git.xonotic.org/xonotic/  ''
@@ -32,3 +34,19 @@ allmirrors()
 
        "$@" ssh  push ssh://xonotic@push.git.xonotic.org/ ''
 }
+
+have_time=true
+measure_time()
+{
+       if $have_time; then
+               time -p "$@"
+       else
+               "$@"
+       fi
+}
+if { measure_time sh -c 'true'; } 2>&1 >/dev/null | grep '^user ' >/dev/null; then
+       msg "Timing via the time utility works."
+else
+       have_time=false
+       msg "Timing not supported."
+fi