automatically remove the files with pixel differences...

...from the changed file list (making sure that those can't end
committed)
This commit is contained in:
Nils Kneuper 2011-03-11 14:31:18 +00:00
parent 0d5aa46e74
commit 1b081b5c32

View file

@ -106,7 +106,10 @@ get_statistics_and_delete_temp_files()
echo "* processing ${1} (nice = ${2})..."
if [ -e ${1} ] && [ -e ${1}.new ]; then
if [ ! -z `cat ${broken_file_list} | cut -f1 -d " " | grep ${1}` ]; then
echo "ERROR: temporary file ${1}.new has pixel differences compared to the original, not using this optimized file."
rm -f ${1}.new
elif [ -e ${1} ] && [ -e ${1}.new ]; then
# Compare output size with original and print per-file statistics
local old_png_size=`stat -c %s ${1} 2> /dev/null`
local new_png_size=`stat -c %s ${1}.new 2> /dev/null`