Properly report device programming errors

master
Timothy Pearson 11 years ago
parent 98d8958426
commit 401379667e

@ -11,6 +11,17 @@ fi
UNIQUEID=$(date "+%s%N")
DEVICETYPE=$(bitdevice $1)
SVFFILE=/tmp/${UNIQUEID}.svf
if [[ $? != 0 ]]; then
exit 1
fi
bit2svf $1 $SVFFILE $DEVICETYPE
if [[ $? != 0 ]]; then
rm -f $SVFFILE
exit 1
fi
xsvf-rpi -v -s $SVFFILE
if [[ $? != 0 ]]; then
rm $SVFFILE
exit 1
fi
rm $SVFFILE

Loading…
Cancel
Save