Sat, 05 Mar 2022 13:19:59 +0200
only render svg to png if the png does not exist
svg-to-png.sh | file | annotate | diff | comparison | revisions |
--- 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