Merge "Make svg_check.sh verbose"

This commit is contained in:
jenkins-bot 2017-12-11 22:01:31 +00:00 committed by Gerrit Code Review
commit a9dd923651

View file

@ -3,10 +3,13 @@ found=0
while read -r svgfile; do
outfile="$svgfile.tmp"
echo -n "Checking compression: $svgfile ... "
node_modules/.bin/svgo --config .svgo.yml -i "$svgfile" -o "$outfile" -q
if [ "$(wc -c < "$svgfile")" -gt "$(wc -c < "$outfile")" ]; then
echo "File $svgfile is not compressed."
echo -e "\nERR> file $svgfile is not compressed."
found=$((found + 1))
else
echo "OK"
fi
rm "$outfile"
done < <(find resources -type f -name '*.svg')