From: Rudolf Polzer Date: Sat, 18 Jan 2014 11:07:41 +0000 (+0100) Subject: Stop relying on exit status from invocation of "time". X-Git-Tag: xonotic-v0.8.0~46 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=521c08406137d3ea1c92fcf401430306166c4b50;p=xonotic%2Fxonotic.git Stop relying on exit status from invocation of "time". Instead, check if its output starts with "user ". --- diff --git a/misc/tools/all/config.subr b/misc/tools/all/config.subr index 864c17e3..cb07d15e 100644 --- a/misc/tools/all/config.subr +++ b/misc/tools/all/config.subr @@ -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