aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lsb
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2012-09-20 12:56:59 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-20 13:18:19 +0100
commita19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3 (patch)
treedf84bd192b722295630191c120d7bf65101d2134 /meta/recipes-extended/lsb
parent6d8aeb0c9b939082cc8d54a940d615b33d81348d (diff)
downloadopenembedded-core-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/recipes-extended/lsb')
-rw-r--r--meta/recipes-extended/lsb/lsb_4.1.bb6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
index a3242db708..55ea241783 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -31,12 +31,12 @@ do_install(){
mkdir -p ${D}${base_bindir}
mkdir -p ${D}/${baselib}
mkdir -p ${D}${sysconfdir}/lsb-release.d
- echo -n "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
+ printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
if [ "${TARGET_ARCH}" = "i586" ];then
- echo -n "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
+ printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
else
- echo -n "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
+ printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
fi
echo "\"" >> ${D}${sysconfdir}/lsb-release
echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release