dotnet/update.sh: format output with nixfmt
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user