add a script to fix the definition in the svg

inkscape likes to hardcode the color in the elements,
remove all those that use css instead
This commit is contained in:
Marco Martin 2014-04-01 16:32:01 +02:00
parent ee6ef01e0a
commit da650d0f46

23
tools/currentColorFillFix.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
if [ $# -ne 1 ];
then echo Usage: $0 file.svgz
exit 1
fi
if [ ! -f $1 ]; then
echo "you must specify a valid svg"
exit 1
fi
file=`echo $1 | cut -d'.' --complement -f2-`
mv $1 $file.svg.gz
gunzip $file.svg.gz
echo Processing $file
/usr/bin/perl -p -i -e "s/color:#[^;]*;fill:currentColor/fill:currentColor/g" $file.svg
gzip $file.svg
mv $file.svg.gz $file.svgz