diff options
author | mdarocha <git@mdarocha.pl> | 2023-07-14 00:57:43 +0200 |
---|---|---|
committer | mdarocha <git@mdarocha.pl> | 2023-07-14 01:11:05 +0200 |
commit | 4217948676306cbbb89a4d63a3c7aff76e8858b6 (patch) | |
tree | 8d519dec1a28cd3908e2419f1050ae6e09418964 /pkgs/development/compilers/dotnet | |
parent | f79c73c2ca8b4d01c78eb1448bd85e9c12405ad8 (diff) | |
download | nixlib-4217948676306cbbb89a4d63a3c7aff76e8858b6.tar nixlib-4217948676306cbbb89a4d63a3c7aff76e8858b6.tar.gz nixlib-4217948676306cbbb89a4d63a3c7aff76e8858b6.tar.bz2 nixlib-4217948676306cbbb89a4d63a3c7aff76e8858b6.tar.lz nixlib-4217948676306cbbb89a4d63a3c7aff76e8858b6.tar.xz nixlib-4217948676306cbbb89a4d63a3c7aff76e8858b6.tar.zst nixlib-4217948676306cbbb89a4d63a3c7aff76e8858b6.zip |
dotnet-sdk: update.sh - run atomically
Diffstat (limited to 'pkgs/development/compilers/dotnet')
-rwxr-xr-x | pkgs/development/compilers/dotnet/update.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/development/compilers/dotnet/update.sh b/pkgs/development/compilers/dotnet/update.sh index 5f991ce823c5..45c08edce85b 100755 --- a/pkgs/development/compilers/dotnet/update.sh +++ b/pkgs/development/compilers/dotnet/update.sh @@ -2,7 +2,7 @@ #!nix-shell -I nixpkgs=../../../../. -i bash -p curl jq nix gnused # shellcheck shell=bash -set -euo pipefail +set -Eeuo pipefail release () { local content="$1" @@ -332,6 +332,10 @@ Examples: channel_version=$(jq -r '."channel-version"' <<< "$content") support_phase=$(jq -r '."support-phase"' <<< "$content") + + result=$(mktemp) + trap 'rm -f $result' TERM INT EXIT + echo "{ buildAspNetCore, buildNetRuntime, buildNetSdk }: # v$channel_version ($support_phase) @@ -354,7 +358,9 @@ $(aspnetcore_packages "${aspnetcore_version}") $(sdk_packages "${runtime_version}") ]; }; -}" > "./versions/${sem_version}.nix" +}" > "${result}" + + cp "${result}" "./versions/${sem_version}.nix" echo "Generated ./versions/${sem_version}.nix" done } |