From ed335a3113e8a385fcf4d567fd18d3a8931cd3d9 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 4 Nov 2022 22:44:57 +0800 Subject: [PATCH] handle '+' in kernel version string It appears if the kernel is built from Git repo where HEAD is not a tag. --- common/libs/func_check_version.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/libs/func_check_version.sh b/common/libs/func_check_version.sh index 81d4aeb..a4a8526 100644 --- a/common/libs/func_check_version.sh +++ b/common/libs/func_check_version.sh @@ -52,7 +52,10 @@ inline_doc echo -ne "${TXT}${spaceSTR:${#TXT}} ${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}" - IFS=".-(pab" # Split up w.x.y.z as well as w.x.y-rc (catch release candidates) + # Split up w.x.y.z as well as w.x.y-rc (catch release candidates). + # Also strip trailing "+" which appears for kernel built from a Git + # repository where HEAD is not a tag. + IFS=".-(pab+" set -- $ref_version # set positional parameters to minimum ver values ref_major=$1; ref_minor=$2; ref_revision=$3 #