mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-10-11 02:42:01 +00:00
Always get the latest winetricks release
This commit is contained in:
@@ -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_base_url="https://install.robertsspaceindustries.com/rel/2"
|
||||||
rsi_installer_latest_yml="${rsi_installer_base_url}/latest.yml"
|
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
|
# Github repo and script version info
|
||||||
repo="starcitizen-lug/lug-helper"
|
repo="starcitizen-lug/lug-helper"
|
||||||
releases_url="https://github.com/${repo}/releases"
|
releases_url="https://github.com/${repo}/releases"
|
||||||
@@ -2833,6 +2828,9 @@ download_wine() {
|
|||||||
# Download winetricks to a temporary file
|
# Download winetricks to a temporary file
|
||||||
# Accepts an optional string argument "next" to download the latest -next version instead of the stable release
|
# Accepts an optional string argument "next" to download the latest -next version instead of the stable release
|
||||||
download_winetricks() {
|
download_winetricks() {
|
||||||
|
# Set variables for the latest winetricks urls
|
||||||
|
set_latest_winetricks
|
||||||
|
|
||||||
if [ "$1" = "next" ]; then
|
if [ "$1" = "next" ]; then
|
||||||
# Download the -next version
|
# Download the -next version
|
||||||
download_file "$winetricks_next_url" "winetricks" "winetricks"
|
download_file "$winetricks_next_url" "winetricks" "winetricks"
|
||||||
@@ -2936,6 +2934,13 @@ set_latest_default_runner() {
|
|||||||
default_runner_source=0
|
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()
|
# MARK: get_latest_release()
|
||||||
# Get the latest release version of a repo. Expects "user/repo_name" as input
|
# 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
|
# Credits for this go to https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
|
||||||
|
Reference in New Issue
Block a user