diff --git a/extract-and-generate b/extract-and-generate index 002eaf8..a59509b 100755 --- a/extract-and-generate +++ b/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/mj-msc.tex b/mj-msc.tex index f5e2bd5..212c0a1 100644 --- a/mj-msc.tex +++ b/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}