From b81ff210f4593253fcc03428e0a4523d55ee17f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 1 Apr 2021 20:44:22 +0300 Subject: [PATCH] generate only mj-msc.pdf mj-msc-all is harder and meaningless --- IV/extract-and-generate | 11 ++++++----- IV/mj-msc.tex | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/IV/extract-and-generate b/IV/extract-and-generate index 002eaf8..a59509b 100755 --- a/IV/extract-and-generate +++ b/IV/extract-and-generate @@ -1,12 +1,13 @@ #!/bin/bash set -euo pipefail dir=$(mktemp -d) -fname=${1:-mj-msc-all.pdf} -echo "Extracting $fname to $dir/" && pdfdetach -saveall -o "$dir" "$fname" -echo "Generating $dir/$fname ..." -make -j $(nproc) -C "$dir" "$fname" &> "$dir/make.log" || { +src=${1:-mj-msc-all.pdf} +dst=${2:-mj-msc.pdf} +echo "Extracting $src to $dir/" && pdfdetach -saveall -o "$dir" "$src" +echo "Generating $dir/$dst ..." +make -j $(nproc) -C "$dir" "$dst" &> "$dir/make.log" || { echo "Generation failed. Log extract:" && tail -20 "$dir/make.log" exit 1 } -echo "Opening $dir/$fname ..." && xdg-open "$dir/$fname" +echo "Opening $dir/$dst ..." && xdg-open "$dir/$dst" echo "File has been closed. Removing $dir" && rm -fr "$dir" diff --git a/IV/mj-msc.tex b/IV/mj-msc.tex index f5e2bd5..212c0a1 100644 --- a/IV/mj-msc.tex +++ b/IV/mj-msc.tex @@ -200,10 +200,6 @@ results have been manually calculated. The test suite executes parts of the algorithm against a predefined set of geometries, and asserts that the output matches the resulting hand-calculated geometry. -The full test suite can be executed with a single command, and completes in a -few seconds. Having an easily accessible test suite boosts confidence that no -unexpected regressions have been added while modifying the algorithm. - \begin{figure}[H] \centering \includegraphics[width=\linewidth]{test-figures} @@ -211,6 +207,10 @@ unexpected regressions have been added while modifying the algorithm. \label{fig:test-figures} \end{figure} +The full test suite can be executed with a single command, and completes in a +few seconds. Having an easily accessible test suite boosts confidence that no +unexpected regressions have been added while modifying the algorithm. + \section{Description of the implementation} \subsection{Definition of a Bend}