mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 01:15:12 +03:00
39f5d50fcd
City names are now disambiguated by a two-letter country code. This commit handles almost everything needed to make this transition. Main next steps are fixing up map edits automatically and making the city picker UI understand the extra level of hierarchy. A little bit of fallout: lakeslice gridlocks again; this regression is actually from the recent traffic signal changes, but I'm just now regenerating everything. Will fix soon.
32 lines
797 B
Bash
Executable File
32 lines
797 B
Bash
Executable File
#!/bin/bash
|
|
|
|
country=$1
|
|
city=$2;
|
|
map=$3;
|
|
|
|
mkdir screens_before;
|
|
cd screens_before;
|
|
unzip ../../data/input/${country}/${city}/screenshots/${map}.zip;
|
|
cd ..;
|
|
before=screens_before;
|
|
after=screenshots/${country}/${city}/${map};
|
|
|
|
rm -rf diff
|
|
mkdir diff
|
|
|
|
for file in `ls $before | grep -v full.png | grep -v combine.sh`; do
|
|
# For whatever reason, the intersection annotation doesn't seem to
|
|
# always match up between two captures.
|
|
prefix=`echo $file | sed 's/_.*//' | sed 's/.png//' | sed 's/.gif//'`;
|
|
|
|
diff $before/${prefix}* $after/${prefix}*;
|
|
if [ $? -eq 1 ]; then
|
|
compare $before/${prefix}* $after/${prefix}* diff/${prefix}.png;
|
|
feh diff/${prefix}.png $before/${prefix}* $after/${prefix}*;
|
|
# Handle interrupts by killing the script entirely
|
|
if [ $? -ne 0 ]; then
|
|
exit;
|
|
fi
|
|
fi
|
|
done
|