scripts: signall: skip updating hash of previous kmods/ main master v22
authorChristian Marangi <ansuelsmth@gmail.com>
Sun, 17 Nov 2024 15:13:02 +0000 (16:13 +0100)
committerPetr Štetiar <ynezz@true.cz>
Mon, 18 Nov 2024 08:08:57 +0000 (08:08 +0000)
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 <ansuelsmth@gmail.com>
scripts/signall.sh

index 6be0ef187325f70edb32cba81771f1af523a4b81..3bea7be1e4de51d5ade657ac7a944b6f59a1b925 100755 (executable)
@@ -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")