svg-to-png.sh

Sat, 05 Mar 2022 13:18:28 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 05 Mar 2022 13:18:28 +0200
changeset 160
536efae7137e
parent 158
5bd755eaa5a8
child 162
3ebe1a0ca818
permissions
-rwxr-xr-x

Add document closing

158
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #!/bin/bash
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 mkdir --parents icons
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3 for svgfile in $(find icons_svg -name '*.svg')
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 do
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 pngfile="icons/$(basename ${svgfile%.svg}.png)"
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 echo "$svgfile => $pngfile"
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 convert -background none "${svgfile}" "${pngfile}"
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8 done

mercurial