From 37ba7474e26a681db5687d9ca00730c588edecb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Barroso=20Galindo?= Date: Wed, 15 Sep 2021 18:00:52 +0200 Subject: [PATCH] Fixing Atari800 and Atari5200 wrong categories. --- .github/update_distribution.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/update_distribution.sh b/.github/update_distribution.sh index e5f99c816..18ba7bf61 100755 --- a/.github/update_distribution.sh +++ b/.github/update_distribution.sh @@ -137,6 +137,10 @@ process_url() { "user-content-fonts") INSTALLER=install_fonts ;; *) INSTALLER=install_other_core ;; esac + + if [[ "${URL}" =~ Atari800 ]] ; then + INSTALLER=install_atari800 + fi ${INSTALLER} "${TMP_FOLDER}" "${TARGET_DIR}" "${CATEGORY}" @@ -270,6 +274,35 @@ install_other_core() { done } +install_atari800() { + local TMP_FOLDER="${1}" + local TARGET_DIR="${2}" + local CATEGORY="${3}" + local IFS=$'\n' + + local NAME= + case "${CATEGORY}" in + "_Computer") NAME="Atari800" ;; + "_Console") NAME="Atari5200" ;; + *) + echo "Could not install Atari 800 core." + exit 1 + ;; + esac + + for bin in $(files_with_stripped_date "${TMP_FOLDER}/releases" | grep "${NAME}" | uniq) ; do + + get_latest_release "${TMP_FOLDER}" "${bin}" + local LAST_RELEASE_FILE="${GET_LATEST_RELEASE_RET}" + + if is_not_rbf_release "${LAST_RELEASE_FILE}" ; then + continue + fi + + copy_file "${TMP_FOLDER}/releases/${LAST_RELEASE_FILE}" "${TARGET_DIR}/${CATEGORY}/${LAST_RELEASE_FILE}" + done +} + install_main_binary() { local TMP_FOLDER="${1}" local TARGET_DIR="${2}"