From 96d67898a7947f7b37c5aa226cb65e469eddbcff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Barroso=20Galindo?= Date: Mon, 22 Aug 2022 19:48:16 +0200 Subject: [PATCH] Update update_distribution.sh --- .github/update_distribution.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/update_distribution.sh b/.github/update_distribution.sh index aef329765..463db5597 100755 --- a/.github/update_distribution.sh +++ b/.github/update_distribution.sh @@ -89,6 +89,7 @@ fetch_core_urls() { CORE_URLS=${CORE_URLS}$'\n'"https://raw.githubusercontent.com/MiSTer-devel/Scripts_MiSTer/master/timezone.sh" CORE_URLS=${CORE_URLS}$'\n'"user-content-linux-binary"$'\n'"https://github.com/MiSTer-devel/PDFViewer_MiSTer" CORE_URLS=${CORE_URLS}$'\n'"user-content-empty-folder"$'\n'"games/TGFX16-CD" + CORE_URLS=${CORE_URLS}$'\n'"user-content-gamecontrollerdb"$'\n'"https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt" CORE_URLS=${CORE_URLS}$'\n'"user-cheats"$'\n'"https://gamehacking.org/mister/" } @@ -111,6 +112,7 @@ classify_core_categories() { "user-content-scripts") ;& "user-cheats") ;& "user-content-empty-folder") ;& + "user-content-gamecontrollerdb") ;* "user-content-folders-"*) ;& "user-content-mra-alternatives") ;& "user-content-mra-alternatives-under-releases") ;& @@ -157,6 +159,7 @@ process_url() { "user-content-scripts") EARLY_INSTALLER=install_script ;; "user-content-empty-folder") EARLY_INSTALLER=install_empty_folder ;; "user-cheats") EARLY_INSTALLER=install_cheats ;; + "user-content-gamecontrollerdb") EARLY_INSTALLER=install_gamecontrollerdb ;; *) ;; esac @@ -572,6 +575,16 @@ install_empty_folder() { touch_folder "${TARGET_DIR}/${URL}" } +install_gamecontrollerdb() { + local URL="${1}" + local TARGET_DIR="${2}" + + mkdir -p "${TARGET_DIR}/linux/gamecontrollerdb/" || true + echo "SDL Game Controller DB: ${URL}" + pushd "${TARGET_DIR}/linux/gamecontrollerdb/" > /dev/null 2>&1 + curl -sSLf "${URL}" -O + popd > /dev/null 2>&1 +} declare -A CHEAT_MAPPINGS=( \ ["fds"]="NES" \