mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-07-01 16:40:35 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
e0d149494d | |||
9800420d73 |
@ -106,6 +106,8 @@ runners_dir="$data_dir/lutris/runners/wine"
|
|||||||
runner_sources=(
|
runner_sources=(
|
||||||
"RawFox" "https://api.github.com/repos/rawfoxDE/raw-wine/releases"
|
"RawFox" "https://api.github.com/repos/rawfoxDE/raw-wine/releases"
|
||||||
"Molotov/Snatella" "https://api.github.com/repos/snatella/wine-runner-sc/releases"
|
"Molotov/Snatella" "https://api.github.com/repos/snatella/wine-runner-sc/releases"
|
||||||
|
"/dev/null" "https://api.github.com/repos/gort818/wine-sc-lug/releases"
|
||||||
|
"GloriousEggroll" "https://api.github.com/repos/GloriousEggroll/wine-ge-custom/releases"
|
||||||
)
|
)
|
||||||
# Set a maximum number of runner versions to display from each url
|
# Set a maximum number of runner versions to display from each url
|
||||||
max_runners=20
|
max_runners=20
|
||||||
@ -819,6 +821,9 @@ runner_install() {
|
|||||||
*.tgz)
|
*.tgz)
|
||||||
runner_name="$(basename "$runner_file" .tgz)"
|
runner_name="$(basename "$runner_file" .tgz)"
|
||||||
;;
|
;;
|
||||||
|
*.tar.xz)
|
||||||
|
runner_name="$(basename "$runner_file" .tar.xz)"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
debug_print exit "Unknown archive filetype in runner_install function. Aborting."
|
debug_print exit "Unknown archive filetype in runner_install function. Aborting."
|
||||||
;;
|
;;
|
||||||
@ -882,10 +887,10 @@ runner_install() {
|
|||||||
debug_print continue "Installing runner into $runners_dir/$runner_name..."
|
debug_print continue "Installing runner into $runners_dir/$runner_name..."
|
||||||
if [ "$use_zenity" -eq 1 ]; then
|
if [ "$use_zenity" -eq 1 ]; then
|
||||||
# Use Zenity progress bar
|
# Use Zenity progress bar
|
||||||
mkdir -p "$runners_dir/$runner_name" && tar -xzf "$tmp_dir/$runner_file" -C "$runners_dir/$runner_name" | \
|
mkdir -p "$runners_dir/$runner_name" && tar -xf "$tmp_dir/$runner_file" -C "$runners_dir/$runner_name" | \
|
||||||
zenity --progress --pulsate --no-cancel --auto-close --title="Star Citizen LUG Helper" --text="Installing runner...\n" 2>/dev/null
|
zenity --progress --pulsate --no-cancel --auto-close --title="Star Citizen LUG Helper" --text="Installing runner...\n" 2>/dev/null
|
||||||
else
|
else
|
||||||
mkdir -p "$runners_dir/$runner_name" && tar -xzf "$tmp_dir/$runner_file" -C "$runners_dir/$runner_name"
|
mkdir -p "$runners_dir/$runner_name" && tar -xf "$tmp_dir/$runner_file" -C "$runners_dir/$runner_name"
|
||||||
fi
|
fi
|
||||||
lutris_needs_restart="true"
|
lutris_needs_restart="true"
|
||||||
;;
|
;;
|
||||||
@ -894,10 +899,10 @@ runner_install() {
|
|||||||
debug_print continue "Installing runner into $runners_dir..."
|
debug_print continue "Installing runner into $runners_dir..."
|
||||||
if [ "$use_zenity" -eq 1 ]; then
|
if [ "$use_zenity" -eq 1 ]; then
|
||||||
# Use Zenity progress bar
|
# Use Zenity progress bar
|
||||||
mkdir -p "$runners_dir" && tar -xzf "$tmp_dir/$runner_file" -C "$runners_dir" | \
|
mkdir -p "$runners_dir" && tar -xf "$tmp_dir/$runner_file" -C "$runners_dir" | \
|
||||||
zenity --progress --pulsate --no-cancel --auto-close --title="Star Citizen LUG Helper" --text="Installing runner...\n" 2>/dev/null
|
zenity --progress --pulsate --no-cancel --auto-close --title="Star Citizen LUG Helper" --text="Installing runner...\n" 2>/dev/null
|
||||||
else
|
else
|
||||||
mkdir -p "$runners_dir" && tar -xzf "$tmp_dir/$runner_file" -C "$runners_dir"
|
mkdir -p "$runners_dir" && tar -xf "$tmp_dir/$runner_file" -C "$runners_dir"
|
||||||
fi
|
fi
|
||||||
lutris_needs_restart="true"
|
lutris_needs_restart="true"
|
||||||
;;
|
;;
|
||||||
@ -931,6 +936,18 @@ runner_select_install() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Check for GlibC-Version if TKG is selected, as he requires 2.33
|
||||||
|
if [ "$contributor_url" = "https://api.github.com/repos/gort818/wine-sc-lug/releases" ]; then
|
||||||
|
printf "checking for glibc \n"
|
||||||
|
system_glibc=($(ldd --version | awk '/ldd/{print $NF}'))
|
||||||
|
printf "system glibc-versuib: $system_glibc \n"
|
||||||
|
required_glibc="2.33"
|
||||||
|
if [ "$(bc <<< "$required_glibc>$system_glibc")" == "1" ]; then
|
||||||
|
message warning "Your glibc version is too low, /dev/null requires v$required_glibc "
|
||||||
|
proton_manage
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Fetch a list of runner versions from the selected contributor
|
# Fetch a list of runner versions from the selected contributor
|
||||||
# To add new sources, handle them here, in the if statement
|
# To add new sources, handle them here, in the if statement
|
||||||
# just above, and the runner_install function above
|
# just above, and the runner_install function above
|
||||||
@ -967,6 +984,9 @@ runner_select_install() {
|
|||||||
*.tgz)
|
*.tgz)
|
||||||
runner_name="$(basename "${runner_versions[i]}" .tgz)"
|
runner_name="$(basename "${runner_versions[i]}" .tgz)"
|
||||||
;;
|
;;
|
||||||
|
*.tar.xz)
|
||||||
|
runner_name="$(basename "${runner_versions[i]}" .tar.xz)"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
debug_print exit "Unknown archive filetype in runner_select_install function. Aborting."
|
debug_print exit "Unknown archive filetype in runner_select_install function. Aborting."
|
||||||
;;
|
;;
|
||||||
@ -1235,6 +1255,24 @@ fi
|
|||||||
live_or_ptu="$live_dir"
|
live_or_ptu="$live_dir"
|
||||||
lutris_needs_restart="false"
|
lutris_needs_restart="false"
|
||||||
|
|
||||||
|
# Credits for this go to https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
|
||||||
|
get_latest_release() {
|
||||||
|
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
|
||||||
|
grep '"tag_name":' | # Get tag line
|
||||||
|
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if a new Verison of the script is available
|
||||||
|
repo="the-sane/lug-helper"
|
||||||
|
current_version="v1.9"
|
||||||
|
latest_version=$(get_latest_release "$repo")
|
||||||
|
|
||||||
|
if [ "$latest_version" != "$current_version" ]; then
|
||||||
|
# Print to stdout and also try warning the user through message
|
||||||
|
printf "New version available, check https://github.com/the-sane/lug-helper/releases \n"
|
||||||
|
message info "New version available, check <a href='https://github.com/the-sane/lug-helper/releases'>https://github.com/the-sane/lug-helper/releases</a> \n"
|
||||||
|
fi
|
||||||
|
|
||||||
# If invoked with command line arguments, process them and exit
|
# If invoked with command line arguments, process them and exit
|
||||||
if [ "$#" -gt 0 ]; then
|
if [ "$#" -gt 0 ]; then
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
|
Reference in New Issue
Block a user