three.cad/icon/svg-to-favicon

19 lines
362 B
Plaintext
Raw Normal View History

2021-03-20 19:08:15 +00:00
#!/usr/bin/env bash
svg=icon
size=(16 24 32 64)
out=""
for i in ${size[@]}; do
inkscape --export-filename="./$svg-$i.png" $svg.svg -w $i -h $i
out+="$svg-$i.png "
done
size=(192 512)
for i in ${size[@]}; do
inkscape --export-filename="./$svg-$i.png" $svg.svg -w $i -h $i
done
convert $out favicon.ico
mv favicon.ico icon-192.png icon-512.png ../dist