3 if [ $# -ne 2 -a $# -ne 3 ]; then
4 echo "You need to supply two arguments, e.g.:"
5 echo "$0 actions/view-file-columns ../../../../kdebase/apps/dolphin/icons/"
6 echo "...and optionally the namespace (e.g. \"ox\" or \"hi\") as third argument."
10 # Split the two arguments into their category and icon name parts.
12 src_category
=${src%/*}
24 # Move the scalable icon.
25 if [ -f scalable
/$src.svgz
]; then
26 echo "Moving scalable/$src.svgz to $destdir/${ns}sc-$src_category-$src_icon.svgz..."
27 svn
mv scalable
/$src.svgz
$destdir/${ns}sc-
$src_category-$src_icon.svgz
31 # Move the optimized small versions of the icon.
32 for size
in 8 16 22 32 48 64 128; do
35 if [ -f scalable
/$src_category/small
/$dir/$src_icon.svgz
]; then
36 echo "Moving scalable/$src_category/small/$dir/$src_icon.svgz"
37 echo " to $destdir/${ns}$size-$src_category-$src_icon.svgz..."
39 # Generate the size dir for smaller SVGs (e.g. icons/22x22/) if necessary.
40 if [ ! -d $destdir/small
]; then
41 svn mkdir
$destdir/small
44 svn
mv scalable
/$src_category/small
/$dir/$src_icon.svgz
$destdir/small
/${ns}$size-$src_category-$src_icon.svgz
49 # Move the rendered PNGs.
50 for size
in 8 16 22 32 48 64 128; do
53 if [ -f $dir/$src.png
]; then
54 echo "Moving $dir/$src.png to $destdir/${ns}$size-$src_category-$src_icon.png..."
55 svn
mv $dir/$src.png
$destdir/${ns}$size-$src_category-$src_icon.png