From 0e31e695b393a714665dfedfc46171487cb815c6 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Fri, 23 Sep 2022 17:02:37 +0800 Subject: [PATCH] Preference for `whiptail` --- scripts/run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/run.sh b/scripts/run.sh index 3c1c2f8..c4314ad 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -41,7 +41,7 @@ require_su() { } echo "Checking and ensuring dependencies" check_dependencies() { - command -v whiptail >/dev/null 2>&1 || command -v dialog >/dev/null 2>&1 || NEED_INSTALL+=("dialog") + command -v whiptail >/dev/null 2>&1 || command -v dialog >/dev/null 2>&1 || NEED_INSTALL+=("whiptail") command -v seinfo >/dev/null 2>&1 || NEED_INSTALL+=("setools") command -v lzip >/dev/null 2>&1 || NEED_INSTALL+=("lzip") command -v wine64 >/dev/null 2>&1 || NEED_INSTALL+=("wine") @@ -104,6 +104,7 @@ if [ -n "${NEED_INSTALL[*]}" ]; then if [ "$PM" = "zypper" ]; then NEED_INSTALL=${NEED_INSTALL[*]} readarray -td ' ' NEED_INSTALL <<<"${NEED_INSTALL//setools/setools-console} "; unset 'NEED_INSTALL[-1]'; + readarray -td ' ' NEED_INSTALL <<<"${NEED_INSTALL//whiptail/dialog} "; unset 'NEED_INSTALL[-1]'; elif [ "$PM" = "apk" ]; then NEED_INSTALL=${NEED_INSTALL[*]} readarray -td ' ' NEED_INSTALL <<<"${NEED_INSTALL//p7zip-full/p7zip} "; unset 'NEED_INSTALL[-1]';