Page MenuHomeWickedGov Phorge

svg_check.sh
No OneTemporary

Size
531 B
Referenced Files
None
Subscribers
None

svg_check.sh

#!/usr/bin/env bash
found=0
for svgfile in `find resources -type f -name "*.svg"`; do
outfile="$svgfile.tmp"
node_modules/.bin/svgo --config .svgo.config.js -i $svgfile -o $outfile -q
if [ -f $outfile ]; then
if [ $(wc -c $svgfile | awk '{print $1}') -gt $(wc -c $outfile | awk '{print $1}') ]; then
echo "File $svgfile is not compressed"
found=$((found + 1))
fi
rm $outfile
fi
done
if [ $found -gt 0 ]; then
echo "Found $found uncompressed SVG files. Please compress the files and re-submit the patch"
exit 1
fi

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, May 16, 12:59 (1 d, 5 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
28/08/3440a3176792aa863367d65ccc74
Default Alt Text
svg_check.sh (531 B)

Event Timeline