From be4d80d72189c9d59f1ceb7a6d2d60fc973bdf4c Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 13 Jan 2020 13:42:13 +0000 Subject: [PATCH] linux-libre.updateScript: fix COMMIT option Because bash was being run with -u, if COMMIT wasn't set in the environment the script would just crash here, rather than exiting successfully. --- pkgs/os-specific/linux/kernel/update-libre.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/update-libre.sh b/pkgs/os-specific/linux/kernel/update-libre.sh index 3b8a00edcdac..e056577477ce 100755 --- a/pkgs/os-specific/linux/kernel/update-libre.sh +++ b/pkgs/os-specific/linux/kernel/update-libre.sh @@ -20,7 +20,7 @@ sha256="$(QUIET=1 nix-prefetch-svn "$svn_url" "$rev" | tail -1)" sed -i -e "s/rev = \".*\"/rev = \"$rev\"/" \ -e "s/sha256 = \".*\"/sha256 = \"$sha256\"/" "$path" -if [ -n "$COMMIT" ]; then +if [ -n "${COMMIT-}" ]; then git commit -qm "linux_latest-libre: $old_rev -> $rev" "$path" echo "Updated linux_latest-libre $old_rev -> $rev" fi