abstreet/editor/compare_screencaps.sh

22 lines
417 B
Bash
Raw Normal View History

2019-01-15 20:41:45 +03:00
#!/bin/bash
before=$1;
after=$2;
rm -rf diff
mkdir diff
for file in `ls $before | grep -v full.png | grep -v combine.sh`; do
2019-01-15 20:41:45 +03:00
diff $before/$file $after/$file;
if [ $? -eq 1 ]; then
compare $before/$file $after/$file diff/$file;
if [ "$3" == "-i" ]; then
feh diff/$file $before/$file $after/$file;
# Handle interrupts by killing the script entirely
if [ $? -ne 0 ]; then
exit;
fi
2019-01-15 20:41:45 +03:00
fi
fi
done