Stop relying on exit status from invocation of "time".

Instead, check if its output starts with "user ".
This commit is contained in:
Rudolf Polzer 2014-01-18 12:07:41 +01:00
parent cc3b56f8b5
commit 521c084061

View 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