From b16604d5b15b07c577a94a08e9e45c024a1c0348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Iwanicki?= Date: Fri, 6 Jun 2025 11:31:31 +0200 Subject: [PATCH] dts-functions: check if passed value is number in ask_for_model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes "integer expression expected" error Signed-off-by: MichaƂ Iwanicki --- include/dts-functions.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/dts-functions.sh b/include/dts-functions.sh index 10436ab9..96ab9637 100644 --- a/include/dts-functions.sh +++ b/include/dts-functions.sh @@ -197,7 +197,12 @@ ask_for_model() { echo read -r -p "Enter an option: " OPTION echo - + # loop if not a number + case "$OPTION" in + '' | *[!0-9]*) + continue + ;; + esac if [ "$OPTION" -eq 0 ]; then BOARD_MODEL="" return