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
1 changed files with 4 additions and 1 deletions

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')