3 sizes
="128 64 48 32 22 16"
4 folders
="actions apps devices filesystems mimetypes"
7 date=`date '+%F-%H-%M'`
13 if [ "$icon" == "" ]; then
14 icon
=$
(kdialog
--getopenfilename $curdir)
20 iconName
=$
(basename $icon)
21 iconDir
=$
(basename `dirname $icon`)
22 iconPngName
=$
( echo $iconName | cut
-d .
-f -1 )".png"
24 inkscape
--without-gui --export-png=$iconPngName --export-dpi=72 --export-background-opacity=0 --export-width=512 --export-height=512 $icon > /dev
/null
26 for size
in $sizes; do
27 prefix
="../${size}x${size}"
28 # ====== shall we use a small icon if available?
29 if [ $size -le $min_small ]; then
30 smallicon
="$iconDir/small/${size}x${size}/$iconName"
31 if [ -e $smallicon ]; then
32 inkscape
--without-gui --export-png="../"${size}x
${size}"/"$iconDir"/"$iconPngName --export-dpi=72 --export-background-opacity=0 --export-width=$size --export-height=$size $smallicon > /dev
/null
35 convert
-filter Sinc
-resize ${size}x${size} $iconPngName "../"${size}x${size}"/"$iconDir"/"$iconPngName
38 convert
-filter Sinc
-resize ${size}x${size} $iconPngName "../"${size}x${size}"/"$iconDir"/"$iconPngName
40 echo "Converted the icon named "$
( echo $iconName | cut
-d .
-f -1 )" to size: " $size
45 for size
in $sizes; do
46 svn add
"../"${size}x
${size}"/"$iconDir"/"$iconPngName
50 kdialog
--msgbox "Icon converted and added to SVN"