From eedd58fb68ace8b3a1f473024e6f37850c05f3f4 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Thu, 9 Oct 2025 15:33:08 -0400 Subject: [PATCH] Always get the latest winetricks release --- lug-helper.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index 7c1a74e..79e0f8b 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -183,11 +183,6 @@ lug_wiki_nixos="https://wiki.starcitizen-lug.org/Tips-and-Tricks#nixos" rsi_installer_base_url="https://install.robertsspaceindustries.com/rel/2" rsi_installer_latest_yml="${rsi_installer_base_url}/latest.yml" -# Winetricks download url -winetricks_version="20250102" -winetricks_url="https://raw.githubusercontent.com/Winetricks/winetricks/refs/tags/${winetricks_version}/src/winetricks" -winetricks_next_url="https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks" - # Github repo and script version info repo="starcitizen-lug/lug-helper" releases_url="https://github.com/${repo}/releases" @@ -2833,6 +2828,9 @@ download_wine() { # Download winetricks to a temporary file # Accepts an optional string argument "next" to download the latest -next version instead of the stable release download_winetricks() { + # Set variables for the latest winetricks urls + set_latest_winetricks + if [ "$1" = "next" ]; then # Download the -next version download_file "$winetricks_next_url" "winetricks" "winetricks" @@ -2936,6 +2934,13 @@ set_latest_default_runner() { default_runner_source=0 } +set_latest_winetricks() { + # Winetricks download url + winetricks_version="$(get_latest_release Winetricks/winetricks)" + winetricks_url="https://raw.githubusercontent.com/Winetricks/winetricks/refs/tags/${winetricks_version}/src/winetricks" + winetricks_next_url="https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks" +} + # MARK: get_latest_release() # Get the latest release version of a repo. Expects "user/repo_name" as input # Credits for this go to https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c