mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-15 15:50:36 +00:00
Compare commits
No commits in common. "4b32177e9774b160f54d8a76608bcaf592bb85fa" and "a328b465eff8c9f4ebd0e98245df3b627398a912" have entirely different histories.
4b32177e97
...
a328b465ef
@ -72,8 +72,6 @@ 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"
|
||||||
|
|
||||||
@ -141,7 +139,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
|
||||||
@ -161,15 +159,13 @@ else
|
|||||||
install_script="$helper_dir/lug-lutris-install.json"
|
install_script="$helper_dir/lug-lutris-install.json"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######## Links #############################################################
|
|
||||||
|
|
||||||
# LUG Wiki
|
|
||||||
lug_wiki="https://github.com/starcitizen-lug/information-howtos/wiki"
|
|
||||||
|
|
||||||
# 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"
|
||||||
current_version="v1.15"
|
current_version="v1.14"
|
||||||
|
|
||||||
|
# LUG Wiki
|
||||||
|
lug_wiki="https://github.com/starcitizen-lug/information-howtos/wiki"
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
############################################################################
|
############################################################################
|
||||||
@ -1152,13 +1148,11 @@ 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}')"
|
||||||
|
|
||||||
# Sort the versions and check if the installed glibc is smaller
|
if [ "$(bc <<< "$required_glibc > $system_glibc")" = "1" ]; then
|
||||||
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
|
||||||
@ -1445,6 +1439,11 @@ 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"
|
||||||
}
|
}
|
||||||
@ -1598,6 +1597,20 @@ 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 ]
|
||||||
@ -1696,22 +1709,6 @@ 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