3 if [ $# -ne 3 -a $# -ne 4 ]; then
4 echo "You need to supply three mandatory arguments, e.g.:"
5 echo "$0 apps/internet-mail apps/kmail ../../../../kdepim/kmail/icons/"
6 echo "...and optionally the namespace (e.g. \"ox\" or \"hi\") as fourth argument."
10 # Split the two arguments into their category and icon name parts.
12 src_category
=${src%/*}
16 dest_category
=${dest%/*}
28 # Copy the scalable icon.
29 if [ -f scalable
/$src.svgz
]; then
30 echo "Copying scalable/$src.svgz to $destdir/${ns}sc-$dest_category-$dest_icon.svgz..."
31 svn
cp scalable
/$src.svgz
$destdir/${ns}sc-
$dest_category-$dest_icon.svgz
35 # Copy the optimized small versions of the icon.
36 for size
in 8 16 22 32 48 64 128; do
39 if [ -f scalable
/$src_category/small
/$dir/$src_icon.svgz
]; then
40 echo "Copying scalable/$src_category/small/$dir/$src_icon.svgz"
41 echo " to $destdir/${ns}$size-$dest_category-$dest_icon.svgz..."
43 # Generate the size dir for smaller SVGs (e.g. icons/22x22/) if necessary.
44 if [ ! -d $destdir/small
]; then
45 svn mkdir
$destdir/small
48 svn
cp scalable
/$src_category/small
/$dir/$src_icon.svgz
$destdir/small
/${ns}$size-$dest_category-$dest_icon.svgz
53 # Copy the rendered PNGs.
54 for size
in 8 16 22 32 48 64 128; do
57 if [ -f $dir/$src.png
]; then
58 echo "Copying $dir/$src.png to $destdir/${ns}$size-$dest_category-$dest_icon.png..."
59 svn
cp $dir/$src.png
$destdir/${ns}$size-$dest_category-$dest_icon.png