svg-to-png.sh

changeset 162
3ebe1a0ca818
parent 158
5bd755eaa5a8
equal deleted inserted replaced
161:6fe485a84d06 162:3ebe1a0ca818
1 #!/bin/bash 1 #!/bin/bash
2 mkdir --parents icons 2 mkdir --parents icons
3 for svgfile in $(find icons_svg -name '*.svg') 3 for svgfile in $(find icons_svg -name '*.svg')
4 do 4 do
5 pngfile="icons/$(basename ${svgfile%.svg}.png)" 5 pngfile="icons/$(basename ${svgfile%.svg}.png)"
6 echo "$svgfile => $pngfile" 6 if [[ ! -f "${pngfile}" ]]
7 convert -background none "${svgfile}" "${pngfile}" 7 then
8 echo "$svgfile => $pngfile"
9 convert -background none "${svgfile}" "${pngfile}"
10 fi
8 done 11 done

mercurial