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