Support Linux versions without patch versions in update

This commit is contained in:
Fabian Mastenbroek 2021-02-18 13:51:07 +01:00
parent 3f2686df8a
commit d8b33b61aa
No known key found for this signature in database
GPG key ID: 405FC6F81F0A7B85
2 changed files with 14 additions and 10 deletions

View file

@ -7,4 +7,8 @@ MAJOR=$(echo $1 | sed -e "s/^v//" -e "s/\.[^.]*$//")
CURRENT=$(scripts/version.sh -L)
NEW=$(curl -s https://www.kernel.org/releases.json | jq -r ".releases[]|select(.version | startswith(\"$MAJOR\")) | .version")
[[ "$CURRENT" = "$NEW" ]] || echo $NEW
if [[ "$(scripts/version.sh -p)" = "0" ]]; then
[[ "$(scripts/version.sh -n)" = "$NEW" ]] || echo $NEW
else
[[ "$CURRENT" = "$NEW" ]] || echo $NEW
fi