mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:47:46 +00:00
Meta: Use time instead of /usr/bin/time in lint-ci.sh
I totally overlooked that /usr/bin/time is not universal, which broke some systems. This commit instead calls 'time', allowing either a shell built-in to kick in, or a (potentially different) binary be found anywhere in the PATH.
This commit is contained in:
parent
ef507720f0
commit
230226028a
1 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@ for cmd in \
|
||||||
Meta/lint-python.sh \
|
Meta/lint-python.sh \
|
||||||
Meta/lint-shell-scripts.sh; do
|
Meta/lint-shell-scripts.sh; do
|
||||||
echo "Running ${cmd}"
|
echo "Running ${cmd}"
|
||||||
if "/usr/bin/time" "${cmd}" "$@"; then
|
if "time" "${cmd}" "$@"; then
|
||||||
echo -e "[${GREEN}OK${NC}]: ${cmd}"
|
echo -e "[${GREEN}OK${NC}]: ${cmd}"
|
||||||
else
|
else
|
||||||
echo -e "[${RED}FAIL${NC}]: ${cmd}"
|
echo -e "[${RED}FAIL${NC}]: ${cmd}"
|
||||||
|
@ -44,7 +44,7 @@ done
|
||||||
|
|
||||||
if [ -x ./Build/lagom/Tools/IPCMagicLinter/IPCMagicLinter ]; then
|
if [ -x ./Build/lagom/Tools/IPCMagicLinter/IPCMagicLinter ]; then
|
||||||
echo "Running IPCMagicLinter"
|
echo "Running IPCMagicLinter"
|
||||||
if git ls-files '*.ipc' | /usr/bin/time xargs ./Build/lagom/Tools/IPCMagicLinter/IPCMagicLinter; then
|
if git ls-files '*.ipc' | time xargs ./Build/lagom/Tools/IPCMagicLinter/IPCMagicLinter; then
|
||||||
echo -e "[${GREEN}OK${NC}]: IPCMagicLinter (in Meta/lint-ci.sh)"
|
echo -e "[${GREEN}OK${NC}]: IPCMagicLinter (in Meta/lint-ci.sh)"
|
||||||
else
|
else
|
||||||
echo -e "[${RED}FAIL${NC}]: IPCMagicLinter (in Meta/lint-ci.sh)"
|
echo -e "[${RED}FAIL${NC}]: IPCMagicLinter (in Meta/lint-ci.sh)"
|
||||||
|
@ -55,7 +55,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running Meta/lint-clang-format.sh"
|
echo "Running Meta/lint-clang-format.sh"
|
||||||
if /usr/bin/time Meta/lint-clang-format.sh --overwrite-inplace "$@" && git diff --exit-code; then
|
if time Meta/lint-clang-format.sh --overwrite-inplace "$@" && git diff --exit-code; then
|
||||||
echo -e "[${GREEN}OK${NC}]: Meta/lint-clang-format.sh"
|
echo -e "[${GREEN}OK${NC}]: Meta/lint-clang-format.sh"
|
||||||
else
|
else
|
||||||
echo -e "[${RED}FAIL${NC}]: Meta/lint-clang-format.sh"
|
echo -e "[${RED}FAIL${NC}]: Meta/lint-clang-format.sh"
|
||||||
|
@ -70,7 +70,7 @@ fi
|
||||||
#
|
#
|
||||||
if [ "$ports" = true ]; then
|
if [ "$ports" = true ]; then
|
||||||
echo "Running Meta/lint-ports.py"
|
echo "Running Meta/lint-ports.py"
|
||||||
if /usr/bin/time Meta/lint-ports.py; then
|
if time Meta/lint-ports.py; then
|
||||||
echo -e "[${GREEN}OK${NC}]: Meta/lint-ports.py"
|
echo -e "[${GREEN}OK${NC}]: Meta/lint-ports.py"
|
||||||
else
|
else
|
||||||
echo -e "[${RED}FAIL${NC}]: Meta/lint-ports.py"
|
echo -e "[${RED}FAIL${NC}]: Meta/lint-ports.py"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue