diff options
author | Saulc <lucas@debian> | 2018-01-13 19:41:26 +0100 |
---|---|---|
committer | Saulc <lucas@debian> | 2018-01-13 19:41:26 +0100 |
commit | 4c4f4be30bae96e6cd943de326b1a4b1b841dcd4 (patch) | |
tree | a94e0a063e5df2a9f7f84f720982a3bca0c0cf6d /.tools/pngcheck.sh | |
download | clientdata-4c4f4be30bae96e6cd943de326b1a4b1b841dcd4.tar.gz clientdata-4c4f4be30bae96e6cd943de326b1a4b1b841dcd4.tar.bz2 clientdata-4c4f4be30bae96e6cd943de326b1a4b1b841dcd4.tar.xz clientdata-4c4f4be30bae96e6cd943de326b1a4b1b841dcd4.zip |
Initial commit
Diffstat (limited to '.tools/pngcheck.sh')
-rwxr-xr-x | .tools/pngcheck.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.tools/pngcheck.sh b/.tools/pngcheck.sh new file mode 100755 index 00000000..8955b26e --- /dev/null +++ b/.tools/pngcheck.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +source ./.tools/init.sh + +aptget_update +aptget_install pngcheck + +export LOG1="pngcheck.log" +export LOG2="pngcheck2.log" + +rm ${LOG1} +rm ${LOG2} + +find -H . -type f -name "*.png" -exec pngcheck {} \; >${LOG1} + +grep -v "32-bit RGB+alpha, non-interlaced, " ${LOG1} >${LOG2} +export DATA=$(cat pngcheck2.log) +if [[ -n "${DATA}" ]]; then + echo "Images must be in 32 bit RGBA and non-interlanced" + echo "Wrong images format found:" + cat ${LOG2} + exit 1 +fi |