# HG changeset patch # User Teemu Piippo # Date 1646479199 -7200 # Node ID 3ebe1a0ca81875e85ccc1766dbc242670e354ebe # Parent 6fe485a84d0621b3ee077205eed1e8705afabfde only render svg to png if the png does not exist diff -r 6fe485a84d06 -r 3ebe1a0ca818 svg-to-png.sh --- a/svg-to-png.sh Sat Mar 05 13:18:40 2022 +0200 +++ b/svg-to-png.sh Sat Mar 05 13:19:59 2022 +0200 @@ -3,6 +3,9 @@ for svgfile in $(find icons_svg -name '*.svg') do pngfile="icons/$(basename ${svgfile%.svg}.png)" - echo "$svgfile => $pngfile" - convert -background none "${svgfile}" "${pngfile}" + if [[ ! -f "${pngfile}" ]] + then + echo "$svgfile => $pngfile" + convert -background none "${svgfile}" "${pngfile}" + fi done