From 64104de421e43a70316deab5799faf9a34b76d96 Mon Sep 17 00:00:00 2001 From: Ross Smith II Date: Fri, 2 Aug 2024 11:14:39 -0700 Subject: [PATCH] flameshot: Fix empty URL on Ubuntu 24.04 (Noble) --- 01-main/packages/flameshot | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/01-main/packages/flameshot b/01-main/packages/flameshot index e2925319c..7cd90993e 100644 --- a/01-main/packages/flameshot +++ b/01-main/packages/flameshot @@ -2,10 +2,16 @@ DEFVER=1 CODENAMES_SUPPORTED="buster bullseye focal jammy mantic noble" get_github_releases "flameshot-org/flameshot" "latest" if [ "${ACTION}" != "prettylist" ]; then - case ${UPSTREAM_RELEASE} in + case "${UPSTREAM_RELEASE}" in 22.10) ONLY_ONE="tail -1" ;; *) ONLY_ONE="head -1" esac + if ! grep -q -E "browser_download_url.*\.${UPSTREAM_ID}-${UPSTREAM_RELEASE:0:2}.*\.${HOST_ARCH}\.deb\"" "${CACHE_DIR}/${APP}.json"; then + case "${UPSTREAM_RELEASE}" in + # For 24.x and 25.x, use 22.04, if a more recent version hasn't been released + 2[45].*) UPSTREAM_RELEASE=22.04 ;; + esac + fi URL="$(grep -E "browser_download_url.*\.${UPSTREAM_ID}-${UPSTREAM_RELEASE:0:2}.*\.${HOST_ARCH}\.deb\"" "${CACHE_DIR}/${APP}.json" | $ONLY_ONE | cut -d'"' -f4)" local VERSION_TMP="${URL##*/flameshot-}" VERSION_PUBLISHED="${VERSION_TMP%%[-.]${UPSTREAM_ID}*}"