three.cad/icon/svg-to-favicon

19 lines
362 B
Bash
Executable File

#!/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