[PATCH 1/7] defaultenv: simplify scripting

Marc Kleine-Budde mkl at pengutronix.de
Fri Apr 8 06:49:02 EDT 2011


On 04/08/2011 12:42 PM, Sascha Hauer wrote:
> On Fri, Apr 08, 2011 at 12:19:02PM +0200, Marc Kleine-Budde wrote:
>> Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
>> ---
>>  defaultenv/bin/boot   |    2 +-
>>  defaultenv/bin/update |    8 ++++----
>>  2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
>> index de4fa24..c97a396 100644
>> --- a/defaultenv/bin/boot
>> +++ b/defaultenv/bin/boot
>> @@ -74,7 +74,7 @@ if [ ! -e /dev/ram0.kernel ]; then
>>  	addpart /dev/ram0 8M at 8M(kernel)
>>  fi
>>  
>> -if [ x$kernel_loc = xnfs ] || [ x$kernel_loc = xtftp ]; then
>> +if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
>>  	if [ x$ip = xdhcp ]; then
>>  		dhcp
>>  	fi
>> diff --git a/defaultenv/bin/update b/defaultenv/bin/update
>> index 7c37c36..c78159d 100644
>> --- a/defaultenv/bin/update
>> +++ b/defaultenv/bin/update
>> @@ -32,12 +32,12 @@ elif [ x${type} = xrootfs ]; then
>>  	type=root
>>  elif [ x${type} = xbarebox ]; then
>>  	image=$bareboximage
>> -	if [ x${image} = x ]; then
>> +	if [ -z x${image} ]; then
> 
> s/x${image}/${image}/

ACK

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   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20110408/4cfb283f/attachment.sig>


More information about the barebox mailing list