All of lore.kernel.org
 help / color / mirror / Atom feed
From: seth bollinger <seth.boll@gmail.com>
To: yocto@yoctoproject.org
Subject: [meta-raspberrypi][PATCH 1/2] sdcard_image-rpi.bbclass: Fix error in conditional test
Date: Wed, 24 Apr 2013 20:00:33 -0500	[thread overview]
Message-ID: <51788031.7080701@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

When the shell tests for rootfs type I was seeing "[[: not found".  I
use echo and egrep to test for the xz rootfs type to work around this
error.

Signed-off-by: Seth Bollinger <seth.boll@gmail.com>
---
  classes/sdcard_image-rpi.bbclass |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/classes/sdcard_image-rpi.bbclass 
b/classes/sdcard_image-rpi.bbclass
index 421f561..7fe7c35 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -99,7 +99,7 @@ IMAGE_CMD_rpi-sdimg () {
      # Burn Partitions
      dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 
bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
      # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat
-    if [[ "$SDIMG_ROOTFS_TYPE" == *.xz ]]
+    if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
      then
          xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 
bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 
1024) && sync && sync
      else
-- 
1.7.2.5

[-- Attachment #2: 0001-sdcard_image-rpi.bbclass-Fix-error-in-conditional-te.patch --]
[-- Type: text/plain, Size: 1256 bytes --]

From 26b0b8b79376eea69aeaf91daf43bc6807a09dd0 Mon Sep 17 00:00:00 2001
From: Seth Bollinger <seth.boll@gmail.com>
Date: Mon, 22 Apr 2013 07:23:45 -0500
Subject: [PATCH 1/2] sdcard_image-rpi.bbclass:  Fix error in conditional test

When the shell tests for rootfs type I was seeing "[[: not found".  I
use echo and egrep to test for the xz rootfs type to work around this
error.

Signed-off-by: Seth Bollinger <seth.boll@gmail.com>
---
 classes/sdcard_image-rpi.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 421f561..7fe7c35 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -99,7 +99,7 @@ IMAGE_CMD_rpi-sdimg () {
 	# Burn Partitions
 	dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
 	# If SDIMG_ROOTFS_TYPE is a .xz file use xzcat
-	if [[ "$SDIMG_ROOTFS_TYPE" == *.xz ]]
+	if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
 	then
 		xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
 	else
-- 
1.7.2.5


             reply	other threads:[~2013-04-25  1:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25  1:00 seth bollinger [this message]
2013-04-25 12:38 ` [meta-raspberrypi][PATCH 1/2] sdcard_image-rpi.bbclass: Fix error in conditional test Paul Barker
2013-04-25 12:42   ` Samuel Stirtzel
     [not found]   ` <CA+JN8xMvcoaLKufSeCLO21ozH542OG-uZSn8fDS0OVMGXkUNbw@mail.gmail.com>
2013-04-25 12:59     ` Paul Barker
2013-05-01 19:10       ` Andrei Gherzan
2013-05-02 11:33         ` Paul Barker
2013-05-03  9:30           ` Andrei Gherzan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51788031.7080701@gmail.com \
    --to=seth.boll@gmail.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.