]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
Stop relying on exit status from invocation of "time".
authorRudolf Polzer <divverent@xonotic.org>
Sat, 18 Jan 2014 11:07:41 +0000 (12:07 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 18 Jan 2014 11:07:41 +0000 (12:07 +0100)
Instead, check if its output starts with "user ".

misc/tools/all/config.subr

index 864c17e318fda8154950f1555cf29c87a0426d4d..cb07d15ea8c1f8e24f00e07c63fb6f6cdb8775f0 100644 (file)
@@ -36,6 +36,6 @@ allmirrors()
 }
 
 time=
-if { time -p sh -c 'true'; } >/dev/null 2>&1; then
+if { time -p sh -c 'true'; } 2>&1 >/dev/null | grep '^user ' >/dev/null; then
        time="time -p"
 fi