linux: Fix update script

The script was wrecking `modDirVersion`, putting them back and
ensuring it will not break again.
This commit is contained in:
Tim Steinbach 2019-04-07 08:34:12 -04:00
parent ba24e89d44
commit 922c07d2d2
No known key found for this signature in database
GPG Key ID: 6C654787275A64F1
4 changed files with 4 additions and 4 deletions

View File

@ -6,6 +6,7 @@ buildLinux (args // rec {
version = "4.14.111";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
# branchVersion needs to be x.y
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));

View File

@ -6,6 +6,7 @@ buildLinux (args // rec {
version = "4.19.34";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
# branchVersion needs to be x.y
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));

View File

@ -6,6 +6,7 @@ buildLinux (args // rec {
version = "5.0.7";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
# branchVersion needs to be x.y
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));

View File

@ -48,10 +48,7 @@ ls $NIXPKGS/pkgs/os-specific/linux/kernel | while read FILE; do
sed -i "s/sha256 = \".*\"/sha256 = \"$HASH\"/g" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
# Rewrite the expression
sed -i -e '/version = /d' -e '/modDirVersion = /d' $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
if grep -q '^[0-9]\+.[0-9]\+$' <<< "$V"; then
sed -i "\#buildLinux (args // rec {#a \ modDirVersion = \"${V}.0\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
fi
sed -i -e '/version = /d' $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
sed -i "\#buildLinux (args // rec {#a \ version = \"$V\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
# Commit the changes