From a33ccd250b11e8c967ccca6ef9a8f6ffce589bd2 Mon Sep 17 00:00:00 2001 From: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org> Date: Mon, 14 Apr 2025 15:41:21 +0000 Subject: [PATCH] Not converting svg files when the corresponding png already exists --- publish_spec.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/publish_spec.sh b/publish_spec.sh index 29ca594..a94c240 100755 --- a/publish_spec.sh +++ b/publish_spec.sh @@ -39,7 +39,12 @@ if [ ! $specs ] ; then fi for i in $(find -name "*.svg") ; do - echo "\n------ Converting SVG to PNG for pandoc --------" + png="${i%.svg}.png" + if [ -f "$png" ]; then + echo "Skipping $i — PNG already exists at $png" + continue + fi + echo "\n------ Converting SVG to PNG for pandoc --------" docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$TOOLS_DOCKER_IMAGE" svg2png "/tmp/$i" done -- GitLab