png-verify.sh 378 B

1234567891011121314
  1. #!/bin/bash
  2. # Try to open .png files and display libpng warning if any.
  3. if [ "$#" -eq 0 ]; then
  4. 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 ': $'
  5. else
  6. for i in "$@"; do
  7. pngtopnm "$i" 2>&1 > /dev/null | sed "s#^#${i}: #" | grep -v ': $'
  8. done
  9. fi
  10. # EOF #