fix(deepin): improve download speed and correct URLs for release URLs

This commit is contained in:
Martin Wimpress 2024-06-24 12:08:30 +01:00 committed by Martin Wimpress
parent 7e0e3e8306
commit ac42e6b492
1 changed files with 4 additions and 6 deletions

View File

@ -719,7 +719,7 @@ function editions_debian() {
function releases_deepin() { function releases_deepin() {
#shellcheck disable=SC2046,SC2005 #shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://cdimage.deepin.com/releases/" | grep "href=" | cut -d'"' -f2 | grep -v "\.\." | grep -v nightly | grep -v preview | sed 's|/||g' | tail -n 10 | sort -r) echo $(web_pipe "https://mirrors.kernel.org/deepin-cd/" | grep "href=" | cut -d'"' -f2 | grep -v "\.\." | grep -v nightly | grep -v preview | sed 's|/||g' | tail -n 10 | sort -r)
} }
function releases_devuan() { function releases_devuan() {
@ -1764,11 +1764,9 @@ function get_deepin() {
local REV=${RELEASE} local REV=${RELEASE}
# deepin-desktop-community-20.3-amd64.iso # deepin-desktop-community-20.3-amd64.iso
local URL="https://cdimage.deepin.com/releases/"${RELEASE} local URL="https://cdimage.deepin.com/releases/"${RELEASE}
# fix iso name # Correct URL for 23-RC onwards which has architecture directories
if [[ "${RELEASE}" == *"20" ]] ; then if [[ "${RELEASE}" == *"23-RC"* ]] ; then
REV="1003" URL+="/amd64"
elif [[ "${RELEASE}" == *"20.1" ]]; then
REV="1010"
fi fi
local ISO="deepin-desktop-community-${REV}-amd64.iso" local ISO="deepin-desktop-community-${REV}-amd64.iso"
HASH=$(web_pipe "${URL}/SHA256SUMS" | grep "${ISO}" | cut -d' ' -f1) HASH=$(web_pipe "${URL}/SHA256SUMS" | grep "${ISO}" | cut -d' ' -f1)