write_uboot_platform: Fix a false shell message

This commit is contained in:
The-going 2024-07-23 21:53:32 +03:00 committed by Igor
parent 6998d836d4
commit f878f14dab

View File

@ -86,12 +86,12 @@ write_uboot_platform() {
for f in "${!d[@]}"
do
#echo "skip\seek=${d[$f]%:*} count=${d[$f]#*:}" # uncomment for debugging
if $(dd if=${device} bs=1 skip="${d[$f]%:*}" count="${d[$f]#*:}" \
conv=notrunc status=noxfer 2>/dev/null | cmp ${f})
conv=notrunc status=noxfer 2>/dev/null | cmp --quiet "${f}")
then
echo "Skip $(basename $f), it is equal to the existing one"
else
echo "# Write =: $(basename $f) to ${device}"
dd if=$f of=${device} bs=1 seek="${d[$f]%:*}" conv=notrunc status=noxfer
sync
fi