2019-01-15 20:41:45 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-02-14 02:45:59 +03:00
|
|
|
country=$1
|
|
|
|
city=$2;
|
|
|
|
map=$3;
|
2020-07-08 02:31:52 +03:00
|
|
|
|
|
|
|
mkdir screens_before;
|
|
|
|
cd screens_before;
|
2021-02-14 02:45:59 +03:00
|
|
|
unzip ../../data/input/${country}/${city}/screenshots/${map}.zip;
|
2020-07-08 02:31:52 +03:00
|
|
|
cd ..;
|
2020-11-06 01:42:40 +03:00
|
|
|
before=screens_before;
|
2021-02-14 02:45:59 +03:00
|
|
|
after=screenshots/${country}/${city}/${map};
|
2019-01-15 20:41:45 +03:00
|
|
|
|
|
|
|
rm -rf diff
|
|
|
|
mkdir diff
|
|
|
|
|
2020-04-28 21:39:10 +03:00
|
|
|
for file in `ls $before | grep -v full.png | grep -v combine.sh`; do
|
2019-01-18 01:27:19 +03:00
|
|
|
# For whatever reason, the intersection annotation doesn't seem to
|
|
|
|
# always match up between two captures.
|
2021-01-06 05:28:30 +03:00
|
|
|
prefix=`echo $file | sed 's/_.*//' | sed 's/.png//' | sed 's/.gif//'`;
|
2019-01-18 01:27:19 +03:00
|
|
|
|
|
|
|
diff $before/${prefix}* $after/${prefix}*;
|
2019-01-15 20:41:45 +03:00
|
|
|
if [ $? -eq 1 ]; then
|
2019-01-18 01:27:19 +03:00
|
|
|
compare $before/${prefix}* $after/${prefix}* diff/${prefix}.png;
|
2019-05-17 04:04:14 +03:00
|
|
|
feh diff/${prefix}.png $before/${prefix}* $after/${prefix}*;
|
|
|
|
# Handle interrupts by killing the script entirely
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
exit;
|
2019-01-15 20:41:45 +03:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|