From da650d0f467cc6bd58eca607343455001e0c2370 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 1 Apr 2014 16:32:01 +0200 Subject: [PATCH] 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 --- tools/currentColorFillFix.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 tools/currentColorFillFix.sh diff --git a/tools/currentColorFillFix.sh b/tools/currentColorFillFix.sh new file mode 100755 index 000000000..9705b1205 --- /dev/null +++ b/tools/currentColorFillFix.sh @@ -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 \ No newline at end of file