Skip to content

Commit

Permalink
Add bash scripts to check .png files for libpng errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Grumbel committed Dec 17, 2018
1 parent dfabe16 commit 22d3902
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/png-verify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Try to open .png files and display libpng warning if any.

if [ "$#" -eq 0 ]; then
find ../addons-src/ data/ -iname "*.png" -print0 | while read -d $'\0' i; do echo "$(pngtopnm "$i" 2>&1 > /dev/null )" | sed "s#^#${i}: #"; done | grep -v ': $'
else
for i in "$@"; do
pngtopnm "$i" 2>&1 > /dev/null | sed "s#^#${i}: #" | grep -v ': $'
done
fi

# EOF #

0 comments on commit 22d3902

Please sign in to comment.