Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / runtime / pics / oxygen / icon-copy.sh
blob7a115a0b0570876fdef16fdd969633ff4abb07ca
1 #!/bin/sh
3 if [ $# -ne 2 ]; then
4 echo "You need to supply two arguments, e.g.:"
5 echo "$0 mimetypes/text-plain mimetypes/text-x-generic"
6 exit
7 fi
9 # Split the two arguments into their category and icon name parts.
10 src="$1"
11 src_category=${src%/*}
12 src_icon=${src#*/}
14 dest="$2"
15 dest_category=${dest%/*}
16 dest_icon=${dest#*/}
18 # Copy the scalable icon.
19 if [ -f scalable/$src.svgz ]; then
20 echo "Copying scalable/$src.svgz to scalable/$dest.svgz..."
21 cp scalable/$src.svgz scalable/$dest.svgz
22 svn add scalable/$dest.svgz
23 echo
26 # Copy the optimized small versions of the icon.
27 for dir in 8x8 16x16 22x22 32x32 48x48 64x64 128x128; do
28 if [ -f scalable/$src_category/small/$dir/$src_icon.svgz ]; then
29 echo "Copying scalable/$src_category/small/$dir/$src_icon.svgz"
30 echo " to scalable/$dest_category/small/$dir/$dest_icon.svgz..."
31 cp scalable/$src_category/small/$dir/$src_icon.svgz scalable/$dest_category/small/$dir/$dest_icon.svgz
32 svn add scalable/$dest_category/small/$dir/$dest_icon.svgz
33 echo
35 done
37 # Copy the rendered PNGs.
38 for dir in 8x8 16x16 22x22 32x32 48x48 64x64 128x128; do
39 if [ -f $dir/$src.png ]; then
40 echo "Copying $dir/$src.png to $dir/$dest.png..."
41 svn cp $dir/$src.png $dir/$dest.png
42 echo
44 done