Skip to content

Commit

Permalink
fix ubuntu eol releases (quickemu-project#764)
Browse files Browse the repository at this point in the history
* fix ubuntu eol releases

Signed-off-by: Basil K Y <[email protected]>

* fix hash check when using MD5

---------

Signed-off-by: Basil K Y <[email protected]>
  • Loading branch information
basilky authored and chasecovello committed Apr 3, 2024
1 parent aa33a76 commit 284efaa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -1774,11 +1774,11 @@ function get_ubuntu() {
fi

if wget -q --spider "${URL}/SHA256SUMS"; then
ISO=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | cut -d'*' -f2)
HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso |cut -d' ' -f1)
ISO=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac" | cut -d'*' -f2 | sed '1q;d')
HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac" | cut -d' ' -f1 | sed '1q;d')
else
ISO=$(wget -q -O- "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | cut -d' ' -f3)
HASH=$(wget -q -O- "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | cut -d' ' -f1)
ISO=$(wget -q -O- "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac" | cut -d'*' -f2)
HASH=$(wget -q -O- "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac" | cut -d' ' -f1)
fi

if [[ "${RELEASE}" == *"daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
Expand Down

0 comments on commit 284efaa

Please sign in to comment.