From 731e1acb02240c7ea2ee249f08b7dffc929193dc Mon Sep 17 00:00:00 2001 From: Giles Hutton Date: Thu, 4 Apr 2024 15:51:44 +0100 Subject: [PATCH] Fixes version comparison to use correct argument --- kernel-modules/support-packages/utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel-modules/support-packages/utils.sh b/kernel-modules/support-packages/utils.sh index c2b0a8f3a3..6d89858541 100644 --- a/kernel-modules/support-packages/utils.sh +++ b/kernel-modules/support-packages/utils.sh @@ -8,13 +8,13 @@ _check_min_version() { exit 1 fi - if [[ ! "$1" =~ $version_re ]]; then + if [[ ! "$2" =~ $version_re ]]; then echo >&2 "Error: Invalid version number format '$2'" exit 1 fi IFS='.' read -ra version <<< "${1%-*}" - IFS='.' read -ra min_version <<< "${1%-*}" + IFS='.' read -ra min_version <<< "${2%-*}" for ((i = 0; i < ${#min_version[@]}; i++)); do if ((version[i] < min_version[i])); then