Nimbin[12]?Mirrors & Forks / jhalfs / commits / ed335a3

jhalfs git · trunk

jhalfs LFS build automation (mirror)

lfs mirror bash · first commit 2005-09-11 · last commit 2024-02-13 (2 years ago) · synced 3 days ago · upstream: git.linuxfromscratch.org/jhalfs

Python 78.4% Shell 19.8% Makefile 1.8%
git clone https://git.christianimmanuel.de/mirrors-forks/jhalfs.gitwget https://git.christianimmanuel.de/mirrors-forks/jhalfs/archive/jhalfs.tar.gz

handle '+' in kernel version string

Xi Ruoyao · 2022-11-04 14:44 · ed335a3113e8a385fcf4d567fd18d3a8931cd3d9

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
   #