From 7a7ba72524a30ece719f7ec4ab0209701d40ff92 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 16 Sep 2026 01:55:25 +0200 Subject: [PATCH] simplify: publish rendered PDFs with move --- README.md | 2 +- tools/render.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0233e89..edbeb65 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ bash tools/render-all.sh reports --output-dir output The renderer validates input before invoking Typst. It stages the report and its branding asset in an isolated temporary project, then publishes the completed -PDF atomically. Existing output is rejected unless `--force` is explicit. +PDF after a successful render. Existing output is rejected unless `--force` is explicit. Logo paths resolve relative to the input report. Absolute paths, parent traversal, and symlinked assets are rejected. Reports without branding use the diff --git a/tools/render.sh b/tools/render.sh index b389ba6..64721d0 100755 --- a/tools/render.sh +++ b/tools/render.sh @@ -55,5 +55,5 @@ if ! "$typst_command" compile --root "$stage" --input "report=report.$format" -- "$stage/report.typ" "$stage/report.pdf"; then fail "invalid report or Typst rendering failed" fi -if [[ "$force" == true ]]; then mv -f -- "$stage/report.pdf" "$output"; else ln -- "$stage/report.pdf" "$output"; fi +if [[ "$force" == true ]]; then mv -f -- "$stage/report.pdf" "$output"; else mv -- "$stage/report.pdf" "$output"; fi echo "Rendered PDF: $output"