Improved the new version
[oxy-cursors.git] / svgs / generate_pngs.sh
blob2cd92b82e073d7fc5b762d1e69ac21a1927790ae
1 #!/bin/bash
3 colors="blue yellow brown grey green violet red purple navy sea_blue emerald hot_orange white"
4 oldDir=$(pwd)
5 SIZE="24"
7 for color in $colors; do
9 echo "Generating PNGs for the color: $color"
11 mkdir -p ../pngs
12 mkdir -p ../pngs/$color;
13 cp $color/*.svg ../pngs/$color/
14 cd ../pngs/$color/
16 #cleanup from previous pngs
17 rm *.png
19 for icon in $(ls *.svg); do
20 if [ "$icon" != "half-busy.svg" ] && [ "$icon" != "fleur.svg" ];
21 then
22 inkscape --without-gui --export-png=$( echo $icon | sed s/.svg// ).png --export-dpi=72 --export-background-opacity=0 --export-width=$SIZE --export-height=$SIZE $icon 2> /dev/null;
23 else
24 inkscape --without-gui --export-png=$( echo $icon | sed s/.svg// ).png --export-background-opacity=0 --export-width=32 --export-height=32 $icon 2> /dev/null;
26 done
28 rm *.svg
29 cd $oldDir
30 done