diff --git a/scripts/update-resonite.sh b/scripts/update-resonite.sh index 0390f7d..39540db 100644 --- a/scripts/update-resonite.sh +++ b/scripts/update-resonite.sh @@ -17,19 +17,12 @@ if [ "${ENABLE_MODS}" = "true" ]; then mkdir -p /RML/rml_mods /RML/rml_libs /RML/rml_config # Symlink rml_mods, rml_libs and rml_config to where Resonite will read them. - ln -sf /RML/rml_mods ${HEADLESS_DIRECTORY}/rml_mods - ln -sf /RML/rml_libs ${HEADLESS_DIRECTORY}/rml_libs - ln -sf /RML/rml_config ${HEADLESS_DIRECTORY}/rml_config - - # From: https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8?permalink_comment_id=5097031#gistcomment-5097031 - # Fetch the latest release version number for ResoniteModLoader - latest_version=$(curl -s https://api.github.com/repos/resonite-modding-group/ResoniteModLoader/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")') - # Remove the 'v' prefix from the version number - version=${latest_version#v} - # Construct the download URLs for RML and Harmony - harmonydll_url="https://github.com/resonite-modding-group/ResoniteModLoader/releases/download/${latest_version}/0Harmony-Net8.dll" - rmldll_url="https://github.com/resonite-modding-group/ResoniteModLoader/releases/download/${latest_version}/ResoniteModLoader.dll" - #Download the required DLLs - curl -L -o "rml_libs/0Harmony-Net8.dll" "$harmonydll_url" - curl -L -o "Libraries/ResoniteModLoader.dll" "$rmldll_url" + ln -s /RML/rml_mods ${HEADLESS_DIRECTORY}/rml_mods + ln -s /RML/rml_libs ${HEADLESS_DIRECTORY}/rml_libs + ln -s /RML/rml_config ${HEADLESS_DIRECTORY}/rml_config + + # Download RML and 0harmony + curl -SslL https://github.com/resonite-modding-group/ResoniteModLoader/releases/latest/download/0Harmony-Net8.dll -o ${HEADLESS_DIRECTORY}/rml_libs/0Harmony-Net8.dll + curl -SslL https://github.com/resonite-modding-group/ResoniteModLoader/releases/latest/download/ResoniteModLoader.dll -o ${HEADLESS_DIRECTORY}/Libraries/ResoniteModLoader.dll + fi