diff --git a/scripts/build_h3-firmware.sh b/scripts/build_h3-firmware.sh index 886e42d11..6b155a943 100755 --- a/scripts/build_h3-firmware.sh +++ b/scripts/build_h3-firmware.sh @@ -21,9 +21,13 @@ do_check() maxsize=139264 filesize=$(stat -c%s "$1") if (( filesize > maxsize )); then - echo -e "\e[31m[$1 is too big for SPI Flash -> $filesize]\e[0m" + echo -e "\e[33m[$1 is too big for SPI Flash -> $filesize]\e[0m" rm -rf $1 ls -al "$1.gz" + filesize=$(stat -c%s "$1.gz") + if (( filesize > maxsize )); then + echo -e "\e[31m[Error: $1.gz is too big for SPI Flash -> $filesize]\e[0m" + fi else ls -al "$1" fi