blob: 61ea1cb29836991559acf9b8a76e6dbdf12ccb27 (
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
|
#! /bin/sh
function check_item_def
{
grep -q "[(,]$1)" ../item_def.h || echo "$1 missing"
}
function check_item_xml
{
grep -q "^$1\$" check.$$ || echo "$1 will not be rendered"
}
awk '/<layout name="Car"/,/<\/layout/ { if (/<itemgra/) {print $0} }' < ../navit.xml | sed 's/.*item_types="\([^"]*\)".*/\1/' | tr "," "\012" | sort -u >check.$$
echo item_def.h
grep "^ITEM" ../item_def.h | sed -e "s/ITEM(\(.*\))/\1/" -e "s/ITEM2([^,]*,\(.*\))/\1/" |
while read -r x
do
check_item_xml "$x"
done
rm -f check.$$
echo maptool.c
egrep '^ "[nw] +[^ ]+ +[^ ]+' ../maptool.c | sed "s/.* //" | sort -u |
while read -r x
do
check_item_def "${x%%\\n\"}"
done
echo "navit.xml"
grep '<itemgra item_types="' <../navit.xml | cut -d \" -f 2 | tr "," "\012" |
while read -r x
do
check_item_def "$x"
done
echo "garmintypes.txt"
grep "^[0-9]" ../map/garmin/garmintypes.txt | sed -e 's/[A-Z][A-Z]*, //' -e 's/.*= \([^,]*\),.*/\1/' | sort -u |
while read -r x
do
check_item_def "$x"
done
|