kernel/update-zen.sh: add support to .0 patch versions

This commit is contained in:
André Vitor de Lima Matos 2022-05-25 15:25:09 -03:00
parent 882fc91780
commit 3c4e372c3f

View file

@ -7,6 +7,8 @@ old=$(nix-instantiate --eval -A linuxPackages_zen.kernel.modDirVersion "$nixpkgs
old="${old%\"}"
old="${old#\"}"
new=$(curl https://github.com/zen-kernel/zen-kernel/releases.atom | grep -m1 -o -E '[0-9.]+-zen[0-9]+')
# add ".0" patch to modDirVersion when minor only
new=$(echo "$new" | sed -E 's/^([0-9]+)\.([0-9]+)-(\w+)$/\1.\2.0-\3/')
if [[ "$new" == "$old" ]]; then
echo "already up-to-date"
exit 0