mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-15 19:00:35 +00:00
Compare commits
3 Commits
1b334db7cc
...
1844bfda13
Author | SHA1 | Date | |
---|---|---|---|
|
1844bfda13 | ||
|
f78f54ddf7 | ||
|
167edab6ec |
@ -65,12 +65,12 @@ if [ ! -x "$(command -v curl)" ]; then
|
||||
notify-send "lug-helper" "The required package 'curl' was not found on this system.\n" --icon=dialog-warning
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -x "$(command -v zstd)" ]; then
|
||||
#if [ ! -x "$(command -v zstd)" ]; then
|
||||
# Print to stderr and also try warning the user through notify-send
|
||||
printf "lug-helper.sh: The package 'zstd' was not found on this system. It is required for extracting some runner packages.\n" 1>&2
|
||||
notify-send "lug-helper" "The package 'zstd' was not found on this system. It is required for extracting some runner packages.\n" --icon=dialog-warning
|
||||
exit 1
|
||||
fi
|
||||
# printf "lug-helper.sh: The package 'zstd' was not found on this system. It is required for extracting some runner packages.\n" 1>&2
|
||||
# notify-send "lug-helper" "The package 'zstd' was not found on this system. It is required for extracting some runner packages.\n" --icon=dialog-warning
|
||||
# exit 1
|
||||
#fi
|
||||
if [ ! -x "$(command -v mktemp)" ] || [ ! -x "$(command -v sort)" ] || [ ! -x "$(command -v basename)" ] || [ ! -x "$(command -v realpath)" ] || [ ! -x "$(command -v dirname)" ]; then
|
||||
# Print to stderr and also try warning the user through notify-send
|
||||
printf "lug-helper.sh: One or more required packages were not found on this system.\nPlease check that the following coreutils packages are installed:\n- mktemp\n- sort\n- basename\n- realpath\n- dirname\n" 1>&2
|
||||
@ -917,6 +917,29 @@ preflight_check() {
|
||||
|
||||
#------------------------- begin download functions ----------------------------#
|
||||
|
||||
# Detect if lutris is installed
|
||||
lutris_detect() {
|
||||
lutris_installed="false"
|
||||
lutris_standard="false"
|
||||
lutris_flatpak="false"
|
||||
|
||||
# Detect standard lutris
|
||||
if [ -x "$(command -v lutris)" ]; then
|
||||
# Standard Lutris is installed
|
||||
lutris_installed="true"
|
||||
lutris_standard="true"
|
||||
fi
|
||||
|
||||
# Detect flatpak lutris
|
||||
if [ -x "$(command -v flatpak)" ]; then
|
||||
flatpak info lutris >/dev/null 2>&1
|
||||
if [ "$?" -eq 0 ]; then
|
||||
lutris_installed="true"
|
||||
lutris_flatpak="true"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Restart lutris if necessary
|
||||
lutris_restart() {
|
||||
if [ "$lutris_needs_restart" = "true" ] && [ "$(pgrep -f lutris)" ]; then
|
||||
@ -1330,8 +1353,9 @@ download_manage() {
|
||||
debug_print exit "Script error: The download_manage function expects a string argument. Aborting."
|
||||
fi
|
||||
# Check if Lutris is installed
|
||||
if [ ! -x "$(command -v lutris)" ]; then
|
||||
message info "Lutris does not appear to be installed."
|
||||
lutris_detect
|
||||
if [ "$lutris_installed" = "false" ]; then
|
||||
message warning "Lutris is required but does not appear to be installed."
|
||||
return 0
|
||||
fi
|
||||
if [ ! -d "$download_dir" ]; then
|
||||
@ -1512,7 +1536,8 @@ eac_workaround() {
|
||||
# Install Star Citizen using Lutris
|
||||
install_game() {
|
||||
# Check if Lutris is installed
|
||||
if [ ! -x "$(command -v lutris)" ]; then
|
||||
lutris_detect
|
||||
if [ "$lutris_installed" = "false" ]; then
|
||||
message warning "Lutris is required but does not appear to be installed."
|
||||
return 0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user