pngcheck.sh 450 B

123456789101112131415161718192021
  1. #!/usr/bin/env bash
  2. source ./tools/ci/scripts/init.sh
  3. export LOG1="pngcheck.log"
  4. export LOG2="pngcheck2.log"
  5. rm ${LOG1}
  6. rm ${LOG2}
  7. find -H . -type f -name "*.png" -exec pngcheck {} \; >${LOG1}
  8. grep -v "32-bit RGB+alpha, non-interlaced, " ${LOG1} >${LOG2}
  9. export DATA=$(cat pngcheck2.log)
  10. if [[ -n "${DATA}" ]]; then
  11. echo "Images must be in 32 bit RGBA and non-interlanced"
  12. echo "Wrong images format found:"
  13. cat ${LOG2}
  14. exit 1
  15. fi