handle '+' in kernel version string

It appears if the kernel is built from Git repo where HEAD is not a tag.
This commit is contained in:
Xi Ruoyao 2022-11-04 22:44:57 +08:00
parent 35f6261ab5
commit ed335a3113
No known key found for this signature in database
GPG key ID: ACAAD20E19E710E3

View file

@ -52,7 +52,10 @@ inline_doc
echo -ne "${TXT}${spaceSTR:${#TXT}} ${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}" 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 set -- $ref_version # set positional parameters to minimum ver values
ref_major=$1; ref_minor=$2; ref_revision=$3 ref_major=$1; ref_minor=$2; ref_revision=$3
# #