kernel/update.sh: always use -e

This commit is contained in:
Will Dietz 2020-01-09 20:30:12 -06:00
parent 5961f211f3
commit 84a6071bc7
No known key found for this signature in database
GPG Key ID: EBB0EA4124809D02

@ -15,7 +15,7 @@ fi
# Inspect each file and see if it has the latest version
NIXPKGS="$(git rev-parse --show-toplevel)"
ls $NIXPKGS/pkgs/os-specific/linux/kernel | while read FILE; do
KERNEL="$(sed -n $LINUXSED <<< "$FILE")"
KERNEL="$(sed -n -e $LINUXSED <<< "$FILE")"
[ -z "$KERNEL" ] && continue
# Find the matching new kernel version
@ -45,11 +45,11 @@ ls $NIXPKGS/pkgs/os-specific/linux/kernel | while read FILE; do
echo "Failed to get hash of $URL"
continue
fi
sed -i "s/sha256 = \".*\"/sha256 = \"$HASH\"/g" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
sed -i -e "s/sha256 = \".*\"/sha256 = \"$HASH\"/g" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
# Rewrite the expression
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
sed -i -e "\#buildLinux (args // rec {#a \ version = \"$V\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
# Commit the changes
git add -u $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE