From 31eb26b97e7cf8f202c8bd2c65d550edd6e28374 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 17 Nov 2024 16:13:02 +0100 Subject: [PATCH] scripts: signall: skip updating hash of previous kmods/ Handle case where a sha256sums might contain previous kmods/. In such case packages.adb for previous kmods/ needs to be skipped as not included in the sign tar and already signed by previous runs. Skip is limited to kmods/ entry as those are the only entry expected to be present in the sha256sums but not included in sign tar. Signed-off-by: Christian Marangi --- scripts/signall.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/signall.sh b/scripts/signall.sh index 6be0ef1..3bea7be 100755 --- a/scripts/signall.sh +++ b/scripts/signall.sh @@ -90,6 +90,8 @@ if [ -n "$APKSIGNKEY" ]; then grep 'packages\.adb' sha256sums | while IFS= read -r line; do filename="${line#*' *'}" + # Skip updating hash of previous kmods/ if not found in sign tar (already signed) + [ ! -f "$filename" ] && [[ "$filename" == kmods/* ]] && continue escaped_filename="${filename//\//\\\/}" escaped_filename="${escaped_filename//&/\\&}" checksum_output=$(sha256sum --binary -- "$filename") -- 2.30.2