mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-29 09:32:27 +02:00
atusb-flash: show avrdude progress output
- Common (doit): if the environment variable LIVE is set to "true", run the command in "script" instead of using "eval" - Common (LIVE): unset this variable on initialization - atusb-flash (flash): set LIVE, to obtain progress output from avrdude
This commit is contained in:
parent
8c25bc2b63
commit
cbd0fe54b7
11
prod/Common
11
prod/Common
@ -18,6 +18,8 @@ DUT=$2
|
||||
LOG=_log
|
||||
>$LOG
|
||||
|
||||
LIVE=
|
||||
|
||||
if [ ${REF#net:} = $REF ]; then
|
||||
REF_EXEC=
|
||||
else
|
||||
@ -100,7 +102,14 @@ cmd()
|
||||
|
||||
_doit()
|
||||
{
|
||||
eval "$cmd" >_out 2>&1 || { echo "exit code $?" | fail; exit 1; }
|
||||
if ${LIVE:-false}; then
|
||||
echo
|
||||
script -c "$cmd" -q _out ||
|
||||
{ echo "exit code $?" | fail; exit 1; }
|
||||
else
|
||||
eval "$cmd" >_out 2>&1 ||
|
||||
{ echo "exit code $?" | fail; exit 1; }
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,7 +21,9 @@ flash()
|
||||
-U lfuse:w:0x60:m \
|
||||
-U hfuse:w:0xd8:m \
|
||||
-U lock:w:0x2f:m"
|
||||
LIVE=true
|
||||
expect "lock verified"
|
||||
LIVE=false
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user