Add dependency checks for packages needed by winetricks

This commit is contained in:
the-sane 2024-10-26 20:59:31 -04:00
parent d43b92d866
commit c9f9bc6811

View File

@ -54,6 +54,13 @@ if [ ! -x "$(command -v xargs)" ]; then
notify-send "lug-helper" "One or more required packages were not found on this system.\nPlease check that the following findutils packages are installed:\n- xargs\n" --icon=dialog-warning notify-send "lug-helper" "One or more required packages were not found on this system.\nPlease check that the following findutils packages are installed:\n- xargs\n" --icon=dialog-warning
exit 1 exit 1
fi fi
if [ ! -x "$(command -v cabextract)" ] || [ ! -x "$(command -v unzip)" ]; then
# winetricks dependencies
# 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 winetricks is installed.\n" 1>&2
notify-send "lug-helper" "One or more required packages were not found on this system.\nPlease check that winetricks is installed.\n" --icon=dialog-warning
exit 1
fi
# Checks for NixOS for NixOS specific options # Checks for NixOS for NixOS specific options
if (grep '^NAME=NixOS' /etc/os-release -q 2> /dev/null ); then if (grep '^NAME=NixOS' /etc/os-release -q 2> /dev/null ); then