toolkit/func/core/pkg_file/20-mime-image.sh

12 lines
262 B
Bash
Raw Normal View History

2021-07-05 06:50:25 +00:00
#!/bin/bash
r_log "file" "Check image mimetype"
pngFile="$(find /usr/share -type f -name '*.png' -print -quit)"
if [ -z "$pngFile" ]; then
r_log "file" "No png files were found. SKIP"
exit 0
fi
2021-07-06 20:16:01 +00:00
file -i "$pngFile" | grep -q 'image/png'
2021-07-05 06:50:25 +00:00
r_checkExitStatus $?