dist: optimize version parsing
Upstream: no A minor optimization. Signed-off-by: Kairui Song <kasong@tencent.com>
This commit is contained in:
parent
7c237644c8
commit
db277b0d22
|
@ -221,7 +221,6 @@ get_kernel_code_version() {
|
|||
|
||||
if [ ! "$makefile" ]; then
|
||||
die "Error: Failed to read Makefile"
|
||||
return 1
|
||||
fi
|
||||
|
||||
KVERSION=$(get_makefile_var VERSION <<< "$makefile")
|
||||
|
@ -305,6 +304,10 @@ _check_strip_kernel_majver() {
|
|||
local makefile
|
||||
local _kversion _kpatchlevel _ksublevel
|
||||
|
||||
if [[ $tag != *.* ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if rel=$(_do_strip_kernel_majver "$tag"); then
|
||||
echo "$rel"
|
||||
return 0
|
||||
|
|
Loading…
Reference in New Issue