From f26ccde13687329ab9c827cbf75aa2ee60ae41ac Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 30 Dec 2024 11:25:57 -0500 Subject: [PATCH] Allow `+bpo` kernels Seems 6.10 is now being marked `+bpo`. Improve error handling while I'm here. --- .github/scripts/download_kernel_images.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/scripts/download_kernel_images.sh b/.github/scripts/download_kernel_images.sh index 91e8c576..857b1fdc 100755 --- a/.github/scripts/download_kernel_images.sh +++ b/.github/scripts/download_kernel_images.sh @@ -19,14 +19,12 @@ readonly URLS # Find the latest revision of each kernel version. FILES=() for VERSION in "${VERSIONS[@]}"; do - while read -r line; do - FILES+=("$line") - done <<< "$( - printf '%s\n' "$URLS" \ - | grep -E "linux-image-${VERSION//./\\.}\\.[0-9]+(-[0-9]+)?-cloud-${ARCHITECTURE}-unsigned_.*\\.deb" \ - | sort -V \ - | tail -n1 - )" + REGEX="linux-image-${VERSION//./\\.}\\.[0-9]+(-[0-9]+)?(\+bpo)?-cloud-${ARCHITECTURE}-unsigned_.*\\.deb" + match=$(printf '%s\n' "$URLS" | grep -E "$REGEX" | sort -V | tail -n1) || { + printf '%s\nVERSION=%s\nREGEX=%s\n' "$URLS" "$VERSION" "$REGEX" >&2 + exit 1 + } + FILES+=("$match") done # TODO(https://github.com/curl/curl/issues/15729): restore --parallel here if and when it properly