From c9f9bc6811b3960d1b9da80e5132fb7d35a8b8f8 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Sat, 26 Oct 2024 20:59:31 -0400 Subject: [PATCH] Add dependency checks for packages needed by winetricks --- lug-helper.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lug-helper.sh b/lug-helper.sh index 6baa168..7655671 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -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 exit 1 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 if (grep '^NAME=NixOS' /etc/os-release -q 2> /dev/null ); then