Skip to content
Snippets Groups Projects
Commit a33ccd25 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Not converting svg files when the corresponding png already exists

parent 53e0e83c
Branches
No related tags found
No related merge requests found
Pipeline #2140 canceled
...@@ -39,6 +39,11 @@ if [ ! $specs ] ; then ...@@ -39,6 +39,11 @@ if [ ! $specs ] ; then
fi fi
for i in $(find -name "*.svg") ; do for i in $(find -name "*.svg") ; do
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 --------" 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" docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$TOOLS_DOCKER_IMAGE" svg2png "/tmp/$i"
done done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment