dotnet/update.sh: format output with nixfmt

This commit is contained in:
David McFarland
2025-01-16 14:44:32 -04:00
parent adf826603a
commit d3c694126d
+5 -4
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq nix gnused
#!nix-shell -I nixpkgs=./. -i bash -p curl jq nix gnused nixfmt-rfc-style
# shellcheck shell=bash
set -Eeuo pipefail
@@ -310,7 +310,7 @@ update() {
aspnetcore_sources="$(platform_sources "$aspnetcore_files")"
runtime_sources="$(platform_sources "$runtime_files")"
result=$(mktemp)
result=$(mktemp -t dotnet-XXXXXX.nix)
trap "rm -f $result" TERM INT EXIT
(
@@ -388,9 +388,10 @@ in rec {
echo "
sdk_$major_minor_underscore = $latest_sdk;
}"
)> "${result}"
)> "$result"
cp "${result}" "$output"
nixfmt "$result"
cp "$result" "$output"
echo "Generated $output"
}