mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Vanalme Filip <F.Vanalme@TELEVIC.com>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: scripts
Date: Wed, 02 Mar 2011 10:30:29 +0100	[thread overview]
Message-ID: <4D6E0E35.5000503@pengutronix.de> (raw)
In-Reply-To: <6EE7D1502C48E44E92DCADF9DD3E0DB9017FF3B00ED6@SRV-VS06.TELEVIC.COM>


[-- Attachment #1.1: Type: text/plain, Size: 2015 bytes --]

On 03/02/2011 09:36 AM, Vanalme Filip wrote:
>> -----Original Message----- From: Marc Kleine-Budde
>> [mailto:mkl@pengutronix.de] Sent: dinsdag 1 maart 2011 15:12 To:
>> Vanalme Filip Cc: barebox@lists.infradead.org Subject: Re: scripts
>> 
>> On 03/01/2011 03:06 PM, Vanalme Filip wrote: [...]
>> 
>>> One more question about barebox scripts (I guess even scripts in 
>>> general...). This is part of a script from another board (that I
>>> took over for my own board):
>> 
>>> #!/bin/sh
>>> 
>>> . /env/config
>>> 
>>> If [ x$1 = xflash ]; then root=flash kernel=flash fi
>>> 
>>> if [ x$1 = xnet ]; then root=net kernel=net fi
>>> 
>>> why the scripts are using i.e. [ x$1 = xflash ] instead of just
>>> simply [ $1 = flash ] ?
>> Both are doing the same, no ?
>> 
>> The shell is quite old and doesn't support that. But you're right
>> for modern shells like bash or dash.
> 
> [Filip] When I do : barebox:/ echo "this is \"quoted text\""
> 
> I get : barebox:/ this is \"quoted text\"
> 
> I would have expected this : barebox:/ this is "quoted text"

Yeah, that's a known problem.......feel free to fix.
> 
> It looks like the escape character is not working as expected. When I
> have this in my boot script : bootargs="$bootargs
> mtdparts=\"physmap-flash.0:$nor_parts;mxc_nand:$nand_parts\""

You can remove the \". They were needed some time ago, when "mcx_nand"
needed to be the name of the Flash Chip, which contained spaces.

> Will this work correctly ? Will the mtdparts be passed correctly to 
> the kernel ? (I guess the escape character will remain, so I think
> it might be an problem, no?)

I once, or rather the kernel I used, had problems with the \"...

cheers, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2011-03-02  9:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 16:03 scripts Vanalme Filip
2011-02-28 16:09 ` scripts Marc Kleine-Budde
2011-02-28 16:12   ` scripts Marc Kleine-Budde
2011-03-01  8:02     ` scripts Vanalme Filip
2011-03-01 14:06       ` scripts Vanalme Filip
2011-03-01 14:11         ` scripts Marc Kleine-Budde
2011-03-01 14:20           ` scripts Baruch Siach
2011-03-02 16:14             ` scripts Uwe Kleine-König
2011-03-02  8:36           ` scripts Vanalme Filip
2011-03-02  9:30             ` Marc Kleine-Budde [this message]

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=4D6E0E35.5000503@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=F.Vanalme@TELEVIC.com \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox