File indexing completed on 2025-01-19 12:54:46
0001 #!/bin/sh 0002 0003 if [ $# -ne 2 -a $# -ne 3 ]; then 0004 echo "You need to supply two arguments, e.g.:" 0005 echo "$0 actions/view-file-columns ../../../../kdebase/apps/dolphin/icons/" 0006 echo "...and optionally the namespace (e.g. \"ox\" or \"hi\") as third argument." 0007 exit 0008 fi 0009 0010 # Split the two arguments into their category and icon name parts. 0011 src="$1" 0012 src_category=${src%/*} 0013 src_icon=${src#*/} 0014 0015 destdir="$2" 0016 0017 ns="ox" 0018 if [ $# -eq 3 ]; then 0019 ns="$3" 0020 fi 0021 0022 svn add $destdir 0023 0024 # Move the scalable icon. 0025 if [ -f scalable/$src.svgz ]; then 0026 echo "Moving scalable/$src.svgz to $destdir/${ns}sc-$src_category-$src_icon.svgz..." 0027 svn mv scalable/$src.svgz $destdir/${ns}sc-$src_category-$src_icon.svgz 0028 echo 0029 fi 0030 0031 # Move the optimized small versions of the icon. 0032 for size in 8 16 22 32 48 64 128 256; do 0033 dir="${size}x${size}" 0034 0035 if [ -f scalable/$src_category/small/$dir/$src_icon.svgz ]; then 0036 echo "Moving scalable/$src_category/small/$dir/$src_icon.svgz" 0037 echo " to $destdir/${ns}$size-$src_category-$src_icon.svgz..." 0038 0039 # Generate the size dir for smaller SVGs (e.g. icons/22x22/) if necessary. 0040 if [ ! -d $destdir/small ]; then 0041 svn mkdir $destdir/small 0042 fi 0043 0044 svn mv scalable/$src_category/small/$dir/$src_icon.svgz $destdir/small/${ns}$size-$src_category-$src_icon.svgz 0045 echo 0046 fi 0047 done 0048 0049 # Move the rendered PNGs. 0050 for size in 8 16 22 32 48 64 128 256; do 0051 dir="${size}x${size}" 0052 0053 if [ -f $dir/$src.png ]; then 0054 echo "Moving $dir/$src.png to $destdir/${ns}$size-$src_category-$src_icon.png..." 0055 svn mv $dir/$src.png $destdir/${ns}$size-$src_category-$src_icon.png 0056 echo 0057 fi 0058 done