All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] set and test a local variable in a script
@ 2014-11-22 18:23 Andreas Neubacher
  2014-11-22 22:56 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Neubacher @ 2014-11-22 18:23 UTC (permalink / raw)
  To: u-boot

hi,

i'm trying to set a local variable and test the variable in an 
if-then-else script ...
but it's somehow a bit weird!?

- set variable "nea" to 0
- create a script "x" and run .... OK
- modify variable "nea" to 1
- run script "x" again ... NOK?!

... what i'm doing wrong  -  the behavior is the same with 2013.10 and 
2014.01



 >U-Boot# nea=0
 >U-Boot# setenv x "if itest 1 -eq $nea; then echo var1; else echo var0; 
fi;"
 >U-Boot# run x
 >var0
 >U-Boot# nea=1
 >U-Boot# run x
 >var0            <<<<<----- so now i should get the "var1" as a result
 >U-Boot# echo $nea
 >1

 >U-Boot# setenv x "if itest 1 -eq $nea; then echo var1; else echo var0; 
fi;"
 >U-Boot# run x
 >var1          <<<<<------- after i set the script "x" again it's 
working ... ?!


br & thx for any hint,
Andy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-23 17:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-22 18:23 [U-Boot] set and test a local variable in a script Andreas Neubacher
2014-11-22 22:56 ` Wolfgang Denk
2014-11-23 16:56   ` Andreas Neubacher
2014-11-23 17:47     ` Wolfgang Denk

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.