From ccfd4e4ca85347d0389a91d84c4330c8095b516c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Barroso=20Galindo?= Date: Fri, 11 Nov 2022 22:53:02 +0100 Subject: [PATCH] Moving MGL files to core folders --- .github/update_distribution.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/update_distribution.sh b/.github/update_distribution.sh index b45e2a287..95d032a25 100755 --- a/.github/update_distribution.sh +++ b/.github/update_distribution.sh @@ -283,7 +283,7 @@ install_console_core() { if [[ "${EXTENSION,,}" == "mra" ]] ; then continue fi - copy_file_according_to_extension "${TMP_FOLDER}/releases/${file}" "${TARGET_DIR}" "${folder}" "${file}" + copy_file_according_to_extension "${TMP_FOLDER}/releases/${file}" "${TARGET_DIR}" "${folder}" "${file}" "_Console" done touch_folder "${TARGET_DIR}/games/${folder}" @@ -339,7 +339,7 @@ install_computer_core() { done for file in $(files_with_no_date "${TMP_FOLDER}/releases") ; do - copy_file_according_to_extension "${TMP_FOLDER}/releases/${file}" "${TARGET_DIR}" "${folder}" "${file}" + copy_file_according_to_extension "${TMP_FOLDER}/releases/${file}" "${TARGET_DIR}" "${folder}" "${file}" "_Computer" done touch_folder "${TARGET_DIR}/games/${folder}" @@ -375,7 +375,7 @@ install_other_core() { done for file in $(files_with_no_date "${TMP_FOLDER}/releases") ; do - copy_file_according_to_extension "${TMP_FOLDER}/releases/${file}" "${TARGET_DIR}" "${folder}" "${file}" + copy_file_according_to_extension "${TMP_FOLDER}/releases/${file}" "${TARGET_DIR}" "${folder}" "${file}" "${CATEGORY}" done done } @@ -416,7 +416,7 @@ install_atari800() { if [[ "${CATEGORY}" == "_Computer" ]] ; then for file in $(files_with_no_date "${TMP_FOLDER}/releases") ; do - copy_file_according_to_extension "${TMP_FOLDER}/releases/${file}" "${TARGET_DIR}" "${folder}" "${file}" + copy_file_according_to_extension "${TMP_FOLDER}/releases/${file}" "${TARGET_DIR}" "${folder}" "${file}" "${CATEGORY}" done fi @@ -669,14 +669,25 @@ copy_file_according_to_extension() { local TARGET_DIR="${2}" local SYSTEM_FOLDER="${3}" local FILE="${4}" + local CATEGORY="${5}" - if is_doc_file "${FILE}" ; then + if is_mgl_file "${FILE}" ; then + copy_file "${SOURCE}" "${TARGET_DIR}/${CATEGORY}/${FILE}" + elif is_doc_file "${FILE}" ; then copy_file "${SOURCE}" "${TARGET_DIR}/docs/${SYSTEM_FOLDER}/${FILE}" else copy_file "${SOURCE}" "${TARGET_DIR}/games/${SYSTEM_FOLDER}/${FILE}" fi } +is_mgl_file() { + if is_not_file_extension "${1}" "mgl" ; then + return 1 + else + return 0 + fi +} + is_doc_file() { local FILE="${1}" local EXTENSION="${FILE##*.}"