File indexing completed on 2024-05-05 04:00:57

0001 #!/bin/sh
0002 
0003 if [ $# -ne 2 ]; then
0004   echo "You need to supply two arguments, e.g.:"
0005   echo "$0 mimetypes/text-plain mimetypes/text-x-generic"
0006   exit
0007 fi
0008 
0009 # Split the two arguments into their category and icon name parts.
0010 src="$1"
0011 src_category=${src%/*}
0012 src_icon=${src#*/}
0013 
0014 dest="$2"
0015 dest_category=${dest%/*}
0016 dest_icon=${dest#*/}
0017 
0018 # Copy the scalable icon.
0019 if [ -f scalable/$src.svgz ]; then
0020   echo "Copying scalable/$src.svgz to scalable/$dest.svgz..."
0021   svn cp scalable/$src.svgz scalable/$dest.svgz
0022   echo
0023 fi
0024 
0025 # Copy the optimized small versions of the icon.
0026 for dir in 8x8 16x16 22x22 32x32 48x48 64x64 128x128 256x256; do
0027   if [ -f scalable/$src_category/small/$dir/$src_icon.svgz ]; then
0028     echo "Copying scalable/$src_category/small/$dir/$src_icon.svgz"
0029     echo "     to scalable/$dest_category/small/$dir/$dest_icon.svgz..."
0030     svn cp scalable/$src_category/small/$dir/$src_icon.svgz scalable/$dest_category/small/$dir/$dest_icon.svgz
0031     echo
0032   fi
0033 done
0034 
0035 # Copy the rendered PNGs.
0036 for dir in 8x8 16x16 22x22 32x32 48x48 64x64 128x128 256x256; do
0037   if [ -f $dir/$src.png ]; then
0038     echo "Copying $dir/$src.png to $dir/$dest.png..."
0039     svn cp $dir/$src.png $dir/$dest.png
0040     echo
0041   fi
0042 done