aboutsummaryrefslogblamecommitdiffstats
path: root/check/find-unlisted-icons
blob: f493178dd7330be3e5c84eb0df8b03f75798ecec (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                                                 
#!/bin/sh
set -e

for f in scalable/*/*.svg; do
	if test -e "$f"; then
		printf '%s\n' "$f"
	fi
done | sed 's/^scalable\/\(.*\)\.svg$/\1/' | sort > "/tmp/pid-$$-a"

sed 's/\\$//' < icons.mk | sed '/^\s*\(#.*\|\)$/d' | sed 1d | tr -d '\t' | sort > "/tmp/pid-$$-b"

unlisted="$(comm -23 "/tmp/pid-$$-a" "/tmp/pid-$$-b")"
rm "/tmp/pid-$$-a" "/tmp/pid-$$-b"

if test -n "$unlisted"; then
	printf '%s\n' 'The following icons exist but are not listed in icons.mk' "$unlisted" >&2
	exit 1
fi