delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / pics / oxygen / icon-private-copy.sh
blobfe2978b9c63beb123d4583fcf4d4f98e1b59523a
1 #!/bin/sh
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."
7 exit
8 fi
10 # Split the two arguments into their category and icon name parts.
11 src="$1"
12 src_category=${src%/*}
13 src_icon=${src#*/}
15 dest="$2"
16 dest_category=${dest%/*}
17 dest_icon=${dest#*/}
19 destdir="$3"
21 ns="ox"
22 if [ $# -eq 4 ]; then
23 ns="$4"
26 svn add $destdir
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
32 echo
35 # Copy the optimized small versions of the icon.
36 for size in 8 16 22 32 48 64 128; do
37 dir="${size}x${size}"
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
49 echo
51 done
53 # Copy the rendered PNGs.
54 for size in 8 16 22 32 48 64 128; do
55 dir="${size}x${size}"
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
60 echo
62 done