images/genicons.sh
author Edouard Tisserant
Mon, 16 Apr 2018 11:00:04 +0200
changeset 1989 9b5c712f4488
parent 533 25437efb7ae4
child 2238 a01a3ed1af2c
permissions -rwxr-xr-x
More canonical test.
There is an exception happening around here in some cases when connection is dropped while waiting for answer. Not sure that this fixes it but this is anyhow better.
#!/bin/bash

INKSCAPE=inkscape

for i in `cat icons.svg |grep -o -e '%%[^%]*%%'|sed 's/%//g'` 
do
 if [ $i.png -nt icons.svg ]; then
 	echo "Skip $i"
 else
	rm  -f $i.png
	echo "$INKSCAPE" icons.svg -z -e $i.png -i $i
	"$INKSCAPE" icons.svg -z -e $i.png -i $i
 fi
done

cp ico24.png brz.png
convert ico*.png brz.ico
rm -f ico*.png