forked from mkoloberdin/waze
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rdmcompare
49 lines (37 loc) · 810 Bytes
/
rdmcompare
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
47
48
#!/bin/sh
#
# Compare the RoadMap map directory content with the Tiger directory content
# to point out counties that have not yet been translated (or for which the
# translation failed).
#
# USAGE:
# ------
#
# rdmcompare <tiger-path> [maps=<map-directory-path>]
#
MAPSDIR=/usr/local/share/roadmap
STARTDIR=`pwd`
TIGERDIR=$1
shift
case $1 in
maps=*) MAPSDIR=`expr $1 : 'maps=\(.*\)'`
shift
;;
esac
function check_one_county {
base=`basename $1`
fips=`expr substr $base 4 5`
if [ ! -e $MAPSDIR/usc$fips.rdm ] ; then
echo "## usc$fips.rdm was not generated"
echo "## usc$fips.rdm was not generated" >> $STARTDIR/buildmap_errors.log
fi
}
cd $TIGERDIR
for i in tgr*.zip
do
check_one_county $i
done
for i in TGR*.ZIP
do
check_one_county $i
done