File: currentColorFillFix.sh

package info (click to toggle)
plasma-framework 5.28.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,168 kB
  • ctags: 3,945
  • sloc: cpp: 28,840; sh: 534; python: 477; ruby: 117; xml: 110; php: 27; makefile: 5
file content (23 lines) | stat: -rwxr-xr-x 399 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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/\1fill:currentColor/g" $file.svg

gzip $file.svg
mv $file.svg.gz $file.svgz