From 43166a8354e37eae0eae8639eae75a3bdfd91bce Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:02:29 +0300 Subject: [PATCH] Revert "shellfmt: config/sources; no changes" This reverts commit 2f63a9cd987a32a3e87ae6026f116025aec0b2a8. `[${1} / bootinfo_emmc.bin]` `[${1} / FSBL.bin]` - This is the path to the file. It cannot contain spaces. --- config/sources/families/spacemit.conf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/sources/families/spacemit.conf b/config/sources/families/spacemit.conf index d4fda34cf..0d67fd252 100644 --- a/config/sources/families/spacemit.conf +++ b/config/sources/families/spacemit.conf @@ -76,8 +76,8 @@ write_uboot_platform() { declare -A d d=( - [${1} / bootinfo_emmc.bin]="0:$(du -b ${1}/bootinfo_emmc.bin | awk '{print $1}')" - [${1} / FSBL.bin]="512:$(du -b ${1}/FSBL.bin | awk '{print $1}')" + [${1}/bootinfo_emmc.bin]="0:$(du -b ${1}/bootinfo_emmc.bin | awk '{print $1}')" + [${1}/FSBL.bin]="512:$(du -b ${1}/FSBL.bin | awk '{print $1}')" ) if [ -b ${2}boot0 ]; then @@ -86,9 +86,11 @@ write_uboot_platform() { sync fi - for f in "${!d[@]}"; do + for f in "${!d[@]}" + do if $(dd if=${device} bs=1 skip="${d[$f]%:*}" count="${d[$f]#*:}" \ - conv=notrunc status=noxfer 2> /dev/null | cmp --quiet "${f}"); then + 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}"