Skip to content

Commit

Permalink
fix(beersmith3): dynamically parse recent versions
Browse files Browse the repository at this point in the history
  • Loading branch information
philclifford committed Nov 16, 2024
1 parent 2c21def commit 4b984f6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions 01-main/packages/beersmith3
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ DEFVER=1
CODENAMES_SUPPORTED="bionic focal jammy mantic noble"
get_website "https://beersmith.com/download-beersmith/"
if [ "${ACTION}" != "prettylist" ]; then
DL=$(grep -o -E '\"https://beer.*\.deb\"' "$CACHE_FILE" | sed 's/<br>/\n/g')
case ${UPSTREAM_CODENAME} in
bionic)
URL="$(grep "18\.04_amd64\.deb\"" "${CACHE_FILE}" | head -n1 | cut -d'"' -f2)"
;;
focal)
URL="$( grep "3\.2\.7_amd64\.deb\"" "${CACHE_FILE}" | head -n1 | cut -d'"' -f2)"
URL=$(grep 20.04 <<<"${DL}" | cut -d\" -f4)
;;
jammy|mantic)
URL="$(grep "amd64\.deb\"" "${CACHE_FILE}" | head -n1 | cut -d'"' -f2)"
URL=$(grep 22.04 <<<"${DL}" | cut -d\" -f4)
;;
noble|oracular)
URL=$(grep 24.04 <<<"${DL}" | cut -d\" -f2 | uniq)
;;
*)
URL="$(grep "amd64\.deb\"" "${CACHE_FILE}"| head -n1 | cut -d'"' -f2)"
URL=$(grep "${UPSTREAM_RELEASE}" <<<"${DL}" | cut -d\" -f4)
;;
esac

Expand Down

0 comments on commit 4b984f6

Please sign in to comment.