mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-30 23:14:20 +00:00
Detect flatpak lutris
This commit is contained in:
parent
f78f54ddf7
commit
1844bfda13
@ -919,9 +919,24 @@ preflight_check() {
|
|||||||
|
|
||||||
# Detect if lutris is installed
|
# Detect if lutris is installed
|
||||||
lutris_detect() {
|
lutris_detect() {
|
||||||
if [ ! -x "$(command -v lutris)" ]; then
|
lutris_installed="false"
|
||||||
# Standard Lutris is not installed
|
lutris_standard="false"
|
||||||
return 1
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1339,7 +1354,7 @@ download_manage() {
|
|||||||
fi
|
fi
|
||||||
# Check if Lutris is installed
|
# Check if Lutris is installed
|
||||||
lutris_detect
|
lutris_detect
|
||||||
if [ "$?" -eq 1 ]; then
|
if [ "$lutris_installed" = "false" ]; then
|
||||||
message warning "Lutris is required but does not appear to be installed."
|
message warning "Lutris is required but does not appear to be installed."
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -1522,7 +1537,7 @@ eac_workaround() {
|
|||||||
install_game() {
|
install_game() {
|
||||||
# Check if Lutris is installed
|
# Check if Lutris is installed
|
||||||
lutris_detect
|
lutris_detect
|
||||||
if [ "$?" -eq 1 ]; then
|
if [ "$lutris_installed" = "false" ]; then
|
||||||
message warning "Lutris is required but does not appear to be installed."
|
message warning "Lutris is required but does not appear to be installed."
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user