From a3acf4c3f95a77bc61d903db25a9434a7b611866 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 17 Apr 2025 18:11:55 +0100 Subject: vendor.sh: simplify process_release_roms Signed-off-by: Leah Rowe --- include/vendor.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/vendor.sh b/include/vendor.sh index 5523cc6b..2e71a76a 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -520,17 +520,13 @@ process_release_rom() [ "${_xromname#"$vfix"}" != "$_xromname" ]; then _xromnew="${_xrom%/*}/${_xromname#"$vfix"}" - stat -c '%s' "$_xrom" > "tmp/rom.size" || \ - $err "$_xrom: Can't resize '$_xrom' (out: tmp/rom.size)" - read -r xromsize < "tmp/rom.size" || \ - $err "$_xrom: Can't read rom size. $dontflash" - + stat -c '%s' "$_xrom" > "tmp/rom.size" || $err "!resize $_xrom" + read -r xromsize < "tmp/rom.size" || $err "!readsize $_xrom" expr "X$xromsize" : "X-\{0,1\}[0123456789][0123456789]*$" \ 1>/dev/null 2>/dev/null || $err "$_xrom size non-integer" xromsize="`expr $xromsize - 1`" - [ $xromsize -lt 524288 ] && \ - $err "$_xrom size too small; likely not a rom. $dontflash" + [ $xromsize -lt 524288 ] && $err "too small, $xromsize: $_xrom" x_ dd if="$_xrom" of="$_xromnew" bs=$xromsize count=1 rm -f "$_xrom" || $err "Can't rm $_xrom - $dontflash" -- cgit v1.2.1