mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-15 09:30:34 +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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
######## Config ############################################################
|
||||||
|
|
||||||
wine_conf="winedir.conf"
|
wine_conf="winedir.conf"
|
||||||
game_conf="gamedir.conf"
|
game_conf="gamedir.conf"
|
||||||
|
|
||||||
@ -139,7 +141,7 @@ max_download_items=20
|
|||||||
# used to dynamically determine the height of menus
|
# used to dynamically determine the height of menus
|
||||||
menu_option_height="25"
|
menu_option_height="25"
|
||||||
|
|
||||||
############################################################################
|
######## Bundled Files #####################################################
|
||||||
|
|
||||||
# Use logo installed by a packaged version of this script if available
|
# Use logo installed by a packaged version of this script if available
|
||||||
# Otherwise, default to the logo in the same directory
|
# Otherwise, default to the logo in the same directory
|
||||||
@ -159,14 +161,16 @@ else
|
|||||||
install_script="$helper_dir/lug-lutris-install.json"
|
install_script="$helper_dir/lug-lutris-install.json"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Github repo and script version info
|
######## Links #############################################################
|
||||||
repo="starcitizen-lug/lug-helper"
|
|
||||||
releases_url="https://github.com/$repo/releases"
|
|
||||||
current_version="v1.14"
|
|
||||||
|
|
||||||
# LUG Wiki
|
# LUG Wiki
|
||||||
lug_wiki="https://github.com/starcitizen-lug/information-howtos/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"
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
@ -1148,11 +1152,13 @@ download_select_install() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# For runners, check GlibC version against runner requirements
|
# 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"
|
required_glibc="2.33"
|
||||||
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
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"
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -1439,11 +1445,6 @@ install_game() {
|
|||||||
|
|
||||||
# Display the LUG Wiki
|
# Display the LUG Wiki
|
||||||
display_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
|
# 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"
|
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
|
# Set defaults
|
||||||
live_or_ptu="$live_dir"
|
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 invoked with command line arguments, process them and exit
|
||||||
if [ "$#" -gt 0 ]; then
|
if [ "$#" -gt 0 ]; then
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
@ -1709,6 +1696,22 @@ Usage: lug-helper <options>
|
|||||||
fi
|
fi
|
||||||
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
|
# Loop the main menu until the user selects quit
|
||||||
while true; do
|
while true; do
|
||||||
# Configure the menu
|
# Configure the menu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user