* [PATCH] lsbtest: fix comparison bashism
@ 2014-03-11 15:40 Stefan Stanacar
2014-03-30 22:55 ` Trevor Woerner
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Stanacar @ 2014-03-11 15:40 UTC (permalink / raw)
To: openembedded-core
== is a bashism use = instead.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | 4 ++--
meta/recipes-extended/lsb/lsbtest_1.0.bb | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
index 12f0054..ab79985 100644
--- a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
+++ b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
@@ -272,12 +272,12 @@ then
fi
if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then
- if [ ${ARCH} == i686 ];then
+ if [ ${ARCH} = i686 ];then
echo "i486-suse" >> ${PLATFORM_FILE}
echo "i486-noarch" >> ${PLATFORM_FILE}
echo "i486-pc" >> ${PLATFORM_FILE}
echo "noarch-suse" >> ${PLATFORM_FILE}
- elif [ ${ARCH} == x86_64 ]; then
+ elif [ ${ARCH} = x86_64 ]; then
echo "i486-suse" >> ${PLATFORM_FILE}
echo "i486-noarch" >> ${PLATFORM_FILE}
echo "i486-pc" >> ${PLATFORM_FILE}
diff --git a/meta/recipes-extended/lsb/lsbtest_1.0.bb b/meta/recipes-extended/lsb/lsbtest_1.0.bb
index a877beb..f61251e 100644
--- a/meta/recipes-extended/lsb/lsbtest_1.0.bb
+++ b/meta/recipes-extended/lsb/lsbtest_1.0.bb
@@ -19,15 +19,15 @@ do_install() {
install -d ${D}/opt/lsb-test
install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
install -m 0644 ${S}/session ${D}/opt/lsb-test/session
- if [ "${TARGET_ARCH}" == "i586" ];then
+ if [ "${TARGET_ARCH}" = "i586" ];then
sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list
sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session
fi
- if [ "${TARGET_ARCH}" == "x86_64" ];then
+ if [ "${TARGET_ARCH}" = "x86_64" ];then
sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list
sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session
fi
- if [ "${TARGET_ARCH}" == "powerpc" ];then
+ if [ "${TARGET_ARCH}" = "powerpc" ];then
sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list
sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session
fi
@@ -37,7 +37,7 @@ do_install() {
# in the package_list when MLIB=lib64 is being used.
# Otherwise, by default, the ppc32 LSB packages
# will be downloaded by LSB_Test.sh
- if [ "${TARGET_ARCH}" == "powerpc64" ];then
+ if [ "${TARGET_ARCH}" = "powerpc64" ];then
if [ "${PN}" != "${BPN}" ];then
sed -i -e 's/lsbarch/ppc64/g' -e 's/targetarch/ppc64/g' ${D}/opt/lsb-test/packages_list
sed -i -e 's/targetarch/PPC64/g' ${D}/opt/lsb-test/session
--
1.8.5.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lsbtest: fix comparison bashism
2014-03-11 15:40 [PATCH] lsbtest: fix comparison bashism Stefan Stanacar
@ 2014-03-30 22:55 ` Trevor Woerner
2014-03-31 7:55 ` Stanacar, StefanX
0 siblings, 1 reply; 3+ messages in thread
From: Trevor Woerner @ 2014-03-30 22:55 UTC (permalink / raw)
To: Stefan Stanacar, openembedded-core
On 03/11/14 11:40, Stefan Stanacar wrote:
> == is a bashism use = instead.
But the first line of this script is:
#/bin/bash
Shouldn't a bash script be allowed to have bash-isms??!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lsbtest: fix comparison bashism
2014-03-30 22:55 ` Trevor Woerner
@ 2014-03-31 7:55 ` Stanacar, StefanX
0 siblings, 0 replies; 3+ messages in thread
From: Stanacar, StefanX @ 2014-03-31 7:55 UTC (permalink / raw)
To: trevor.woerner@linaro.org; +Cc: openembedded-core@lists.openembedded.org
On Sun, 2014-03-30 at 18:55 -0400, Trevor Woerner wrote:
> On 03/11/14 11:40, Stefan Stanacar wrote:
> > == is a bashism use = instead.
>
> But the first line of this script is:
> #/bin/bash
>
> Shouldn't a bash script be allowed to have bash-isms??!
I was referring to the recipe which shouldn't have bash-isms.
Yes, the recipe installs a script which has /bin/bash, but I didn't saw
any harm in fixing that too.
Cheers,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-31 7:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-11 15:40 [PATCH] lsbtest: fix comparison bashism Stefan Stanacar
2014-03-30 22:55 ` Trevor Woerner
2014-03-31 7:55 ` Stanacar, StefanX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox