Fix:xpm:Make navit_svg2png work with newer icons
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 29 Dec 2008 11:02:54 +0000 (11:02 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 29 Dec 2008 11:02:54 +0000 (11:02 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1869 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/xpm/navit_svg2png

index b794285..90a521a 100755 (executable)
@@ -23,11 +23,11 @@ else
        then
                if [ -z "$w" ]
                then
-                       w=$(grep 'width="[0-9px.]*"' $svg.svg | head -n 1 | sed -e 's/^[^"]*"//' -e 's/[px]*".*//')
+                       w=$(grep 'width="[0-9pxt.]*"' $svg.svg | head -n 1 | sed -e 's/.*width="//' -e 's/[pxt]*".*//')
                fi
                if [ -z "$h" ]
                then
-                       h=$(grep 'height="[0-9px.]*"' $svg.svg | head -n 1 | sed -e 's/^[^"]*"//' -e 's/[px]*".*//')
+                       h=$(grep 'height="[0-9pxt.]*"' $svg.svg | head -n 1 | sed -e 's/.*height="//' -e 's/[pxt]*".*//')
                fi
                ksvgtopng $w $h $svg.svg $png
        elif [ -f $svg.svgz ]