Scripts which may be useful for other

Create a flat structure from icons/hicolor/size/category/icon.png

current_dir=`pwd`
theme_icons="\\ \n"
cd hicolor
for i in `ls`;
do
if test -d $i; then
size=$(echo $i | cut -d x -f 1);
cd $i

for category in `ls`;
do
        if test -d $category; then
                cd $category

                for file in `ls *.png`;
                do
                        newfilename=$(echo $file | sed s/.png//g)
                        echo Copying $file to $category,$newfilename-$size.png
                        theme_icons=$(echo -E "$theme_icons $category,$newfilename-$size.png \\ \n")
                        cp $file $current_dir/$newfilename-$size.png
                done;
                cd ..
        fi

done;
cd ..

fi
done

#generate the Makefile info
echo "Paste this into your Makefile.am:"
echo -e theme_icons = $theme_icons

LukaszJernas/Scripts (last edited 2010-06-18 12:02:42 by LukaszJernas)