From: Rudolf Polzer Date: Sun, 7 Nov 2010 18:40:07 +0000 (+0100) Subject: work around a bug in bash's implementation of "time" X-Git-Tag: xonotic-v0.1.0preview~72 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8734a8fe7d9c610b69e69f529d704aa1db5729a5;p=xonotic%2Fxonotic.git work around a bug in bash's implementation of "time" --- diff --git a/all b/all index 287dfdce..e750d9ae 100755 --- a/all +++ b/all @@ -339,11 +339,16 @@ mkzip0() zip -0y "$@" } +timewrapper() +{ + time -p "$@" +} + mirrorspeed() { # first result is to be ignored, but we use it to check status git ls-remote "$1" refs/heads/master >/dev/null 2>&1 || return 1 - time -p git ls-remote "$1" refs/heads/master 2>&1 >/dev/null | head -n 1 | cut -d ' ' -f 2 | tr -d . | sed 's,^0*,,' + timewrapper git ls-remote "$1" refs/heads/master 2>&1 >/dev/null | head -n 1 | cut -d ' ' -f 2 | tr -d . | sed 's,^0*,,' # unit: clock ticks (depends on what "time" returns }