diff options
author | Andrei Gherzan <andrei@gherzan.ro> | 2012-09-20 12:56:59 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-20 13:18:19 +0100 |
commit | a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3 (patch) | |
tree | df84bd192b722295630191c120d7bf65101d2134 /meta/classes/cml1.bbclass | |
parent | 6d8aeb0c9b939082cc8d54a940d615b33d81348d (diff) | |
download | openembedded-core-contrib-a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3.tar.gz |
Replace "echo -e" with "printf" to have the same behavior in dash or bash
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define
any options and furthermore allows 'echo -e' to be the default behavior.
This means that in dash 'echo -e' will actually print '-e' and interpret
backslashes by default. We use instead 'printf' builtin command with or
without '\n' to simulate 'echo -e' or 'echo -n'.
'printf' needs format while 'echo' can be used without any arguments. So
'echo >' was replaced by 'printf "" >'.
'echo' without '-n' flag adds a new line by default so to keep the same
behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
used.
[YOCTO #3138]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/cml1.bbclass')
-rw-r--r-- | meta/classes/cml1.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass index 67f17ad77e0..37ed792b7c1 100644 --- a/meta/classes/cml1.bbclass +++ b/meta/classes/cml1.bbclass @@ -20,7 +20,7 @@ python do_menuconfig() { except OSError: mtime = 0 - oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; echo -n 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d) + oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d) # FIXME this check can be removed when the minimum bitbake version has been bumped if hasattr(bb.build, 'write_taint'): |