diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2015-06-15 10:20:49 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:38:10 +0100 |
commit | 25cb71799e72d4e0c4fe39653d8b84280d087372 (patch) | |
tree | f8cac3ed4fc81475def02fd2d835a76e87b4a1b8 /meta/classes | |
parent | a0460ac8a2595d4b064b483ca1f282a255ae6411 (diff) | |
download | openembedded-core-25cb71799e72d4e0c4fe39653d8b84280d087372.tar.gz openembedded-core-25cb71799e72d4e0c4fe39653d8b84280d087372.tar.bz2 openembedded-core-25cb71799e72d4e0c4fe39653d8b84280d087372.zip |
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.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/logging.bbclass | 3 |
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 |