mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-14 23:30:37 +00:00
Compare commits
5 Commits
a328b465ef
...
4b32177e97
Author | SHA1 | Date | |
---|---|---|---|
|
4b32177e97 | ||
|
b4762d4724 | ||
|
37c94af2ed | ||
|
6d56599e2f | ||
|
9909221dff |
@ -72,6 +72,8 @@ if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v sort)" ] || [ ! -x "$
|
||||
exit 1
|
||||
fi
|
||||
|
||||
######## Config ############################################################
|
||||
|
||||
wine_conf="winedir.conf"
|
||||
game_conf="gamedir.conf"
|
||||
|
||||
@ -139,7 +141,7 @@ max_download_items=20
|
||||
# used to dynamically determine the height of menus
|
||||
menu_option_height="25"
|
||||
|
||||
############################################################################
|
||||
######## Bundled Files #####################################################
|
||||
|
||||
# Use logo installed by a packaged version of this script if available
|
||||
# Otherwise, default to the logo in the same directory
|
||||
@ -159,14 +161,16 @@ else
|
||||
install_script="$helper_dir/lug-lutris-install.json"
|
||||
fi
|
||||
|
||||
# Github repo and script version info
|
||||
repo="starcitizen-lug/lug-helper"
|
||||
releases_url="https://github.com/$repo/releases"
|
||||
current_version="v1.14"
|
||||
######## Links #############################################################
|
||||
|
||||
# LUG Wiki
|
||||
lug_wiki="https://github.com/starcitizen-lug/information-howtos/wiki"
|
||||
|
||||
# Github repo and script version info
|
||||
repo="starcitizen-lug/lug-helper"
|
||||
releases_url="https://github.com/$repo/releases"
|
||||
current_version="v1.15"
|
||||
|
||||
############################################################################
|
||||
############################################################################
|
||||
|
||||
@ -1146,13 +1150,15 @@ download_select_install() {
|
||||
debug_print exit "Script error: Unknown api/url format in ${download_type}_sources array. Aborting."
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# For runners, check GlibC version against runner requirements
|
||||
if [ "download_type" = "runner" ] && [ "$contributor_name" = "/dev/null" ]; then
|
||||
if [ "$download_type" = "runner" ] && [ "$contributor_name" = "/dev/null" ]; then
|
||||
required_glibc="2.33"
|
||||
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
||||
|
||||
if [ "$(bc <<< "$required_glibc > $system_glibc")" = "1" ]; then
|
||||
# Sort the versions and check if the installed glibc is smaller
|
||||
if [ "$required_glibc" != "$system_glibc" ] &&
|
||||
[ "$system_glibc" = "$(printf "$system_glibc\n$required_glibc" | sort -V | head -n1)" ]; then
|
||||
message warning "Your glibc version is incompatible with the selected runner.\n\nSystem glibc: v$system_glibc\nMinimum required glibc: v$required_glibc"
|
||||
return 1
|
||||
fi
|
||||
@ -1439,11 +1445,6 @@ install_game() {
|
||||
|
||||
# Display the LUG Wiki
|
||||
display_wiki() {
|
||||
if [ -x "$(command -v xdg-open)" ]; then
|
||||
# Open the link in the default browser if xdg-open is available
|
||||
xdg-open "$lug_wiki" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Display a message containing the URL
|
||||
message info "See the Wiki for our Quick-Start Guide, Manual Installation instructions,\nPerformance Tuning, and Common Issues and Solutions:\n\n$lug_wiki"
|
||||
}
|
||||
@ -1597,20 +1598,6 @@ fi
|
||||
# Set defaults
|
||||
live_or_ptu="$live_dir"
|
||||
|
||||
# Check if a newer verison of the script is available
|
||||
latest_version="$(get_latest_release "$repo")"
|
||||
|
||||
if [ "$latest_version" != "$current_version" ] &&
|
||||
[ "$current_version" = "$(printf "$current_version\n$latest_version" | sort -V | head -n1)" ]; then
|
||||
if [ "$use_zenity" -eq 1 ]; then
|
||||
releases_url_formatted="<a href='$releases_url'>$releases_url</a>"
|
||||
else
|
||||
releases_url_formatted="$releases_url"
|
||||
fi
|
||||
|
||||
message info "The latest version of the LUG Helper is $latest_version\nYou are using $current_version\n\nYou can download new releases here:\n$releases_url_formatted"
|
||||
fi
|
||||
|
||||
# If invoked with command line arguments, process them and exit
|
||||
if [ "$#" -gt 0 ]; then
|
||||
while [ "$#" -gt 0 ]
|
||||
@ -1709,6 +1696,22 @@ Usage: lug-helper <options>
|
||||
fi
|
||||
fi
|
||||
|
||||
# Format some URLs for Zenity
|
||||
if [ "$use_zenity" -eq 1 ]; then
|
||||
releases_url="<a href='$releases_url'>$releases_url</a>"
|
||||
lug_wiki="<a href='$lug_wiki'>$lug_wiki</a>"
|
||||
fi
|
||||
|
||||
# Check if a newer verison of the script is available
|
||||
latest_version="$(get_latest_release "$repo")"
|
||||
|
||||
# Sort the versions and check if the installed Helper is smaller
|
||||
if [ "$latest_version" != "$current_version" ] &&
|
||||
[ "$current_version" = "$(printf "$current_version\n$latest_version" | sort -V | head -n1)" ]; then
|
||||
|
||||
message info "The latest version of the LUG Helper is $latest_version\nYou are using $current_version\n\nYou can download new releases here:\n$releases_url"
|
||||
fi
|
||||
|
||||
# Loop the main menu until the user selects quit
|
||||
while true; do
|
||||
# Configure the menu
|
||||
|
Loading…
x
Reference in New Issue
Block a user