File: findmissingcrystal

package info (click to toggle)
kde-dev-scripts 4%3A18.08.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,496 kB
  • sloc: perl: 15,466; lisp: 5,627; sh: 4,157; python: 3,892; ruby: 2,158; makefile: 16; sed: 9
file content (32 lines) | stat: -rwxr-xr-x 742 bytes parent folder | download | duplicates (11)
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
#!/bin/sh
#
# Small script to look at Crystal icons and see which ones are still the
# same as kdeclassic/hicolor.

if [ -z "$1" ] ; then
	echo "usage: findmissingcrystal module"
	exit 1
fi

for icon in `find $1 -name cr*.png` ; do
	fullname=`echo $icon | sed 's,.*cr,,'`
	res=`echo $fullname | cut -d- -f1`
	type=`echo $fullname | cut -d- -f2`
	name=`echo $fullname | cut -d- -f3`
	dir="kdeartwork/IconThemes/kdeclassic/${res}x${res}/${type}s/"
	if [ -d "$dir" ]; then
		classic=`find "${dir}" -name "$name"`
		if [ -s "$classic" ]; then
			diff=`diff $icon $classic`
			if [ -z "$diff" ]; then
				echo "ERR/same: $icon"
			else
				echo "OK /diff: $icon"
			fi
		else
			echo "OK /new : $icon"
		fi
	else
		echo "OK /new : $icon"
	fi
done