From 695d2be43c12b8209cd561099b720987db572167 Mon Sep 17 00:00:00 2001 From: Chris Burton Date: Sat, 20 Dec 2025 17:13:14 +0000 Subject: [PATCH] Use awk to check "dd" version number is high enough to support "status=progress". --- eeptools/eepflash.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eeptools/eepflash.sh b/eeptools/eepflash.sh index e145a8f..7298b95 100755 --- a/eeptools/eepflash.sh +++ b/eeptools/eepflash.sh @@ -161,12 +161,12 @@ if [ ! -d "$SYS/$BUS-00$ADDR" ]; then echo "$TYPE 0x$ADDR" > $SYS/new_device fi -DD_VERSION=$(dd --version 2>&1 | grep coreutils | sed -e 's/\.//' | cut -d' ' -f 3) +DD_VERSION=$(dd --version 2>&1 | grep coreutils | cut -d' ' -f 3) if [ -z "$DD_VERSION" ]; then # probably busybox's dd DD_STATUS="" else - if [ "$DD_VERSION" -ge 824 ]; then + if awk "BEGIN {exit !($DD_VERSION >= 8.24)}"; then DD_STATUS="status=progress" else DD_STATUS="status=none"