Skip to content

Commit

Permalink
flameshot: Fix empty URL on Ubuntu 24.04 (Noble)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasa authored and philclifford committed Aug 4, 2024
1 parent 30a5c40 commit 64104de
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 01-main/packages/flameshot
Original file line number Diff line number Diff line change
Expand Up @@ -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}*}"
Expand Down

0 comments on commit 64104de

Please sign in to comment.