[U-Boot-Users] script examples...

Michael Frey mfrey at pepper.com
Mon Jun 23 22:15:51 CEST 2003


This sounds what I need but I get syntax errors when trying the 
following:


if fatls <filename> then run erase 0x00000000 0x0003ffff
else
run bootm
fi

Should this work?

Michael

On Monday, June 23, 2003, at 03:57  PM, Wolfgang Denk wrote:

> In message <20030623193734.GB5179 at buici.com> you wrote:
>> Do you mean a shell script?
>>
>> Like,
>>
>>   [ -f PATH ] && EXEC_THIS_COMMAND
>>   [ ! -f PATH ] && EXEC_ANOTHER_COMMAND
>
> This doesn't work, as the current implementation of  the  hush  shell
> does  not  contain  a  "test"  command  (and "[" is just an alias for
> "test").
>
> You have to use the return status of existing commands, like
>
> 	if fdosls <some_filename_here>
> 	then run command_1
> 	else run command_2
> 	fi
>
>
> Best regards,
>
> Wolfgang Denk
>
> -- 
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
> Ninety-Ninety Rule of Project Schedules:
>         The first ninety percent of the task takes ninety percent of
> the time, and the last ten percent takes the other ninety percent.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting 
> Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly 
> Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users





More information about the U-Boot mailing list