From b7e1fba11780a03ba03ec5f9d7a7f5a63a4d9a84 Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Mon, 1 Aug 2022 09:14:21 +0100 Subject: [PATCH] Correct batocera for release 34 (#512) * chore: docs submodule * check for current batocera release at runtime --- build-docs | 2 +- quickget | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/build-docs b/build-docs index 51ee39c..c881d8e 160000 --- a/build-docs +++ b/build-docs @@ -1 +1 @@ -Subproject commit 51ee39c41c13fb1cc78e86ec24b100f35c337d70 +Subproject commit c881d8e4862a5810a4793f34626181667fde8f89 diff --git a/quickget b/quickget index f6a3e48..267895a 100755 --- a/quickget +++ b/quickget @@ -291,7 +291,7 @@ function releases_fedora() { } function releases_batocera() { - echo 33 + echo 32 33 34 } function editions_fedora() { @@ -850,8 +850,23 @@ function get_arcolinux() { function get_batocera() { local HASH="" - local ISO="batocera-x86_64-${RELEASE}-20220203.img.gz" - local URL="https://updates.batocera.org/x86_64/stable/last" + local URL="https://mirrors.o2switch.fr/batocera/x86_64/stable/last" + local ISO="$(curl -sl ${URL}/ | grep -e 'batocera.*img.gz'|cut -d\" -f2)" + local CURRENT_RELEASE=$(echo "${ISO}"| cut -d\- -f3) + + + case ${RELEASE} in + ${CURRENT_RELEASE}) #Current release + URL+="" + ;; + *) + URL+="/archives/${RELEASE}" + ISO="$(curl -sl ${URL}/ | grep -e 'batocera.*img.gz'|cut -d\" -f2)" + ;; # non-current are here + + esac + + echo "${URL}/${ISO} ${HASH}" }