mirror of
https://gitlab.com/xonotic/xonotic
synced 2024-12-15 03:15:33 +00:00
work around a bug in bash's implementation of "time"
This commit is contained in:
parent
5727b27a22
commit
8734a8fe7d
7
all
7
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user