aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/logging.bbclass
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-06-15 10:20:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 11:46:56 +0100
commit553305eee83f5291f9f9d30253a0be47d1d1fb49 (patch)
tree54e5893bdb71a5887264b148e8f5916645d6e9b1 /meta/classes/logging.bbclass
parent4caed87a38e8c5afef679a90fb7f74f26ece2043 (diff)
downloadopenembedded-core-contrib-553305eee83f5291f9f9d30253a0be47d1d1fb49.tar.gz
logging.bbclass: avoid bashism in bbdebug()
Checking the bbdebug() debug level parameter with a regular test expression only works in bash. Using tr to filter out digits and then checking whether anything is left achieves the same result and is more portable. (From OE-Core rev: 25cb71799e72d4e0c4fe39653d8b84280d087372) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/logging.bbclass')
-rw-r--r--meta/classes/logging.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/logging.bbclass b/meta/classes/logging.bbclass
index 78d65bda3a..f6648b2119 100644
--- a/meta/classes/logging.bbclass
+++ b/meta/classes/logging.bbclass
@@ -62,7 +62,8 @@ bbdebug() {
# Strip off the debug level and ensure it is an integer
DBGLVL=$1; shift
- if ! [[ "$DBGLVL" =~ ^[0-9]+ ]]; then
+ NONDIGITS=$(echo "$DBGLVL" | tr -d [:digit:])
+ if [ "$NONDIGITS" ]; then
bbfatal "$USAGE"
fi