* [PATCH] classes: Remove various bashisms
@ 2011-11-08 17:57 Richard Purdie
2011-11-08 18:55 ` Joshua Lock
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2011-11-08 17:57 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index 350c29d..53ef47e 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -24,7 +24,7 @@ prelink_image () {
${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf
# Remove the prelink.conf if we had to add it.
- if [ "$dummy_prelink_conf" == "true" ]; then
+ if [ "$dummy_prelink_conf" = "true" ]; then
rm -f ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf
fi
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 42543e0..dc711f2 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -152,7 +152,7 @@ kernel_do_install() {
#
cp -fR * $kerneldir
cp .config $kerneldir
- if [ ! "${S}" == "${B}" ]; then
+ if [ "${S}" != "${B}" ]; then
cp -fR ${S}/* $kerneldir
fi
install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE}
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ba4feee..e8bdcae 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -87,22 +87,22 @@ package_generate_rpm_conf_common() {
shift
printf "_solve_dbpath " > ${rpmconf_base}.macro
- o_colon=false
+ o_colon="false"
for archvar in "$@"; do
printf "_solve_dbpath " > ${rpmconf_base}-${archvar}.macro
- colon=false
+ colon="false"
for each in `cat ${rpmconf_base}-${archvar}.conf` ; do
- if [ "$o_colon" == true ]; then
+ if [ "$o_colon" = "true" ]; then
printf ":" >> ${rpmconf_base}.macro
fi
- if [ "$colon" == true ]; then
+ if [ "$colon" = "true" ]; then
printf ":" >> ${rpmconf_base}-${archvar}.macro
fi
printf "%s" $each >> ${rpmconf_base}.macro
- o_colon=true
+ o_colon="true"
printf "%s" $each >> ${rpmconf_base}-${archvar}.macro
- colon=true
+ colon="true"
done
printf "\n" >> ${rpmconf_base}-${archvar}.macro
done
@@ -214,7 +214,7 @@ package_install_internal_rpm () {
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
- if [ ${ml_prefix} == ${i} ]; then
+ if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
break
@@ -238,7 +238,7 @@ package_install_internal_rpm () {
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
- if [ ${ml_prefix} == ${i} ]; then
+ if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
break
@@ -273,7 +273,7 @@ package_install_internal_rpm () {
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
- if [ ${ml_prefix} == ${i} ]; then
+ if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
break
@@ -364,7 +364,7 @@ package_install_internal_rpm () {
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
- if [ ${ml_prefix} == ${i} ]; then
+ if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
break
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] classes: Remove various bashisms
2011-11-08 17:57 [PATCH] classes: Remove various bashisms Richard Purdie
@ 2011-11-08 18:55 ` Joshua Lock
0 siblings, 0 replies; 2+ messages in thread
From: Joshua Lock @ 2011-11-08 18:55 UTC (permalink / raw)
To: openembedded-core
Great, this was on my To Do!
On 08/11/11 09:57, Richard Purdie wrote:
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
> index 350c29d..53ef47e 100644
> --- a/meta/classes/image-prelink.bbclass
> +++ b/meta/classes/image-prelink.bbclass
> @@ -24,7 +24,7 @@ prelink_image () {
> ${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf
>
> # Remove the prelink.conf if we had to add it.
> - if [ "$dummy_prelink_conf" == "true" ]; then
> + if [ "$dummy_prelink_conf" = "true" ]; then
> rm -f ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf
> fi
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 42543e0..dc711f2 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -152,7 +152,7 @@ kernel_do_install() {
> #
> cp -fR * $kerneldir
> cp .config $kerneldir
> - if [ ! "${S}" == "${B}" ]; then
> + if [ "${S}" != "${B}" ]; then
> cp -fR ${S}/* $kerneldir
> fi
> install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE}
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index ba4feee..e8bdcae 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -87,22 +87,22 @@ package_generate_rpm_conf_common() {
> shift
>
> printf "_solve_dbpath " > ${rpmconf_base}.macro
> - o_colon=false
> + o_colon="false"
>
> for archvar in "$@"; do
> printf "_solve_dbpath " > ${rpmconf_base}-${archvar}.macro
> - colon=false
> + colon="false"
> for each in `cat ${rpmconf_base}-${archvar}.conf` ; do
> - if [ "$o_colon" == true ]; then
> + if [ "$o_colon" = "true" ]; then
> printf ":" >> ${rpmconf_base}.macro
> fi
> - if [ "$colon" == true ]; then
> + if [ "$colon" = "true" ]; then
> printf ":" >> ${rpmconf_base}-${archvar}.macro
> fi
> printf "%s" $each >> ${rpmconf_base}.macro
> - o_colon=true
> + o_colon="true"
> printf "%s" $each >> ${rpmconf_base}-${archvar}.macro
> - colon=true
> + colon="true"
> done
> printf "\n" >> ${rpmconf_base}-${archvar}.macro
> done
> @@ -214,7 +214,7 @@ package_install_internal_rpm () {
> ml_prefix=`echo ${pkg} | cut -d'-' -f1`
> ml_pkg=$pkg
> for i in ${MULTILIB_PREFIX_LIST} ; do
> - if [ ${ml_prefix} == ${i} ]; then
> + if [ ${ml_prefix} = ${i} ]; then
> ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
> archvar=ml_archs
> break
> @@ -238,7 +238,7 @@ package_install_internal_rpm () {
> ml_prefix=`echo ${pkg} | cut -d'-' -f1`
> ml_pkg=$pkg
> for i in ${MULTILIB_PREFIX_LIST} ; do
> - if [ ${ml_prefix} == ${i} ]; then
> + if [ ${ml_prefix} = ${i} ]; then
> ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
> archvar=ml_archs
> break
> @@ -273,7 +273,7 @@ package_install_internal_rpm () {
> ml_prefix=`echo ${pkg} | cut -d'-' -f1`
> ml_pkg=$pkg
> for i in ${MULTILIB_PREFIX_LIST} ; do
> - if [ ${ml_prefix} == ${i} ]; then
> + if [ ${ml_prefix} = ${i} ]; then
> ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
> archvar=ml_archs
> break
> @@ -364,7 +364,7 @@ package_install_internal_rpm () {
> ml_prefix=`echo ${pkg} | cut -d'-' -f1`
> ml_pkg=$pkg
> for i in ${MULTILIB_PREFIX_LIST} ; do
> - if [ ${ml_prefix} == ${i} ]; then
> + if [ ${ml_prefix} = ${i} ]; then
> ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
> archvar=ml_archs
> break
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-08 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08 17:57 [PATCH] classes: Remove various bashisms Richard Purdie
2011-11-08 18:55 ` Joshua Lock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox