comparison scripts/make_pngs.sh @ 154:acfcd3db4bca

Correct Lock color and size
author Stefano Rivera <stefano@rivera.za.net>
date Tue, 13 Sep 2011 22:37:41 +0200
parents a40c94b57602
children
comparison
equal deleted inserted replaced
153:9c47bf162ea1 154:acfcd3db4bca
6 tilesize=20 6 tilesize=20
7 7
8 svgroot=source/svg 8 svgroot=source/svg
9 pngroot=data 9 pngroot=data
10 10
11 for sourcepath in `find $svgroot -name "*.svg"` 11 for sourcepath in `find "$svgroot" -name "*.svg"`
12 do 12 do
13 sourcefile=`basename $sourcepath` 13 sourcefile="`basename $sourcepath`"
14 sourcedir=`dirname $sourcepath` 14 sourcedir="`dirname $sourcepath`"
15 destdir=${sourcedir/#$svgroot/$pngroot} 15 destdir="${sourcedir/#$svgroot/$pngroot}"
16 mkdir -p $destdir 16 mkdir -p "$destdir"
17 destpath=$destdir/${sourcefile/%svg/png} 17 destpath="$destdir/${sourcefile/%svg/png}"
18 rsvg-convert $sourcepath -w $tilesize -h $tilesize -o $destpath 18 opts=""
19 pngcrush -q $destpath tmp && mv tmp $destpath 19 echo "$sourcepath" | grep -Fq /tiles/ && opts="-w $tilesize -h $tilesize"
20 rsvg-convert "$sourcepath" $opts -o "$destpath"
21 pngcrush -q "$destpath" tmp && mv tmp "$destpath"
20 done 22 done