Set _sub to "0" when _kver_split[2] is null
Fixes release kernel versioning, which is lacking the subversion. Example: kernel 6.0 release was versioned as "6.0." and will now be "6.0.0". This also unifies versioning as it'll now always be x.x.x format.
This commit is contained in:
@@ -176,7 +176,11 @@ _set_kver_internal_vars() {
|
|||||||
_basever="${_kver_split[0]}${_kver_split[1]}"
|
_basever="${_kver_split[0]}${_kver_split[1]}"
|
||||||
|
|
||||||
# examples: "5", "rc2", "122"
|
# examples: "5", "rc2", "122"
|
||||||
_sub="${_kver_split[2]}"
|
if [ -n "${_kver_split[2]}" ]; then
|
||||||
|
_sub="${_kver_split[2]}"
|
||||||
|
else
|
||||||
|
_sub="0"
|
||||||
|
fi
|
||||||
|
|
||||||
# Append a zero to the minor if it has single digit
|
# Append a zero to the minor if it has single digit
|
||||||
[[ ${#_kver_split[1]} == "1" ]] && _kver_split[1]="0${_kver_split[1]}"
|
[[ ${#_kver_split[1]} == "1" ]] && _kver_split[1]="0${_kver_split[1]}"
|
||||||
|
Reference in New Issue
Block a user