summaryrefslogtreecommitdiffstats
path: root/kexi/pics/blendkdeicons.sh
blob: 47016de650ad07523ba56a3f523d99f100f9334a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
#
# Generates series of blended icons
#
# Copyright (C) 2004 Jaroslaw Staniek <[email protected]>
#

usage() {
	echo "USAGE: $0 <modifier_icon> <suffix> <icon> <icon> ..
example: $0 action-new_sign _newobj action_table action_query
will result with:
cr16-action-table.png blended using cr16-action-new_sign.png
  and saved to cr16-action-table_newobj.png,
cr22-action-table.png blended using cr22-action-new_sign.png
  and saved to cr22-action-table_newobj.png,
cr16-action-query.png blended using cr16-action-new_sign.png
  and saved to cr16-action-query_newobj.png,
etc..."
}

if [ $# -lt 3 ] ; then usage; exit 1; fi

mod=$1
shift
suffix=$1
shift

if [ -z "$mod" -o -z "$suffix" ] ; then
	usage
	exit 1
fi

icon=$1
while [ -n "$1" ] ; do
	for size in 16 22 32 ; do
		mod_file="cr"$size"-"$mod".png"
		if [ -f "$mod_file" ] ; then
			for i in `ls "cr"$size"-"$icon".png" 2> /dev/null` ; do
				blendicons "$i" "$mod_file" `echo $i | sed "s/\.png/"$suffix".png/"`
			done
		fi
	done
	shift
	icon=$1
done