From 1062a967b09c976b178f9f6097d8abb178a6d7ff Mon Sep 17 00:00:00 2001 From: Tobit Flatscher <53856473+2b-t@users.noreply.github.com> Date: Wed, 11 Oct 2023 23:29:06 +0100 Subject: [PATCH] fix: Prevent dialog from failing when PREEMPT_RT is not available for given Debian version --- src/lib_install_debian.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib_install_debian.sh b/src/lib_install_debian.sh index 99746ff..4c21611 100755 --- a/src/lib_install_debian.sh +++ b/src/lib_install_debian.sh @@ -27,7 +27,9 @@ function select_debian_version() { local DIALOG_POSSIBLE_DEBIAN_VERSIONS="" for VER in ${POSSIBLE_DEBIAN_VERSIONS}; do local PREEMPTRT_FILE=$(get_preemptrt_file "$VER") - DIALOG_POSSIBLE_DEBIAN_VERSIONS="${DIALOG_POSSIBLE_DEBIAN_VERSIONS} ${VER} ${PREEMPTRT_FILE}" + if [ ! -z "${PREEMPTRT_FILE}" ]; then + DIALOG_POSSIBLE_DEBIAN_VERSIONS="${DIALOG_POSSIBLE_DEBIAN_VERSIONS} ${VER} ${PREEMPTRT_FILE}" + fi done echo $(dialog --keep-tite --stdout --menu "Select the desired PREEMPT_RT kernel version:" 0 0 4 ${DIALOG_POSSIBLE_DEBIAN_VERSIONS}) }