From 57d68f5bffecd2beace5af5fd6478480e5033b92 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Tue, 24 Nov 2020 15:51:03 +0100 Subject: script logging and atomic download --- tests/fixtures/verify-entity-download.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/fixtures/verify-entity-download.sh b/tests/fixtures/verify-entity-download.sh index 790afa0..bc229bf 100755 --- a/tests/fixtures/verify-entity-download.sh +++ b/tests/fixtures/verify-entity-download.sh @@ -13,5 +13,6 @@ for ident in $(awk -F, '{print $1"\n"$2}' "$CSV"); do >&2 echo "[cached] $ident" continue fi - curl -sL --fail "$API/release/$ident" | jq --sort-keys . >"$ident" + tempfile=$(mktemp) + curl -sL --fail "$API/release/$ident" | jq --sort-keys . > "$tempfile" && mv "$tempfile" "$ident" done -- cgit v1.2.3