mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-29 11:11:53 +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=_log
|
||||||
>$LOG
|
>$LOG
|
||||||
|
|
||||||
|
LIVE=
|
||||||
|
|
||||||
if [ ${REF#net:} = $REF ]; then
|
if [ ${REF#net:} = $REF ]; then
|
||||||
REF_EXEC=
|
REF_EXEC=
|
||||||
else
|
else
|
||||||
@ -100,7 +102,14 @@ cmd()
|
|||||||
|
|
||||||
_doit()
|
_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 lfuse:w:0x60:m \
|
||||||
-U hfuse:w:0xd8:m \
|
-U hfuse:w:0xd8:m \
|
||||||
-U lock:w:0x2f:m"
|
-U lock:w:0x2f:m"
|
||||||
|
LIVE=true
|
||||||
expect "lock verified"
|
expect "lock verified"
|
||||||
|
LIVE=false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user