1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

logging: fix oedebug loglevel test

When the existing test for loglevel fails, the syntax used results in the recipe
exiting with a silent failure. Performing any bash command after the test block
resolves the problem, such as "shift" or "echo ''". Rewriting with 'if []; then'
blocks provides a cleaner syntax and also resolves the failure.

(From OE-Core rev: 5857516404411040598b69c85d184ccdfc0af2e0)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Darren Hart
2011-04-21 16:56:49 -07:00
committed by Richard Purdie
parent d0382d5c88
commit 43493742a0
+4 -4
View File
@@ -53,15 +53,15 @@ oefatal() {
}
oedebug() {
test $# -ge 2 || {
if [ $# -lt 2]; then
echo "Usage: oedebug level \"message\""
exit 1
}
fi
test ${OEDEBUG:-0} -ge $1 && {
if [ ${OEDEBUG:-0} -ge $1 ]; then
shift
echo "DEBUG:" $*
}
fi
}
oe_runmake() {