Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F2753940
svg_check.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
562 B
Referenced Files
None
Subscribers
None
svg_check.sh
View Options
#!/usr/bin/env bash
found
=
0
for
svgfile
in
`
find
resources
-type
f
-name
"*.svg"
`
;
do
outfile
=
"
$svgfile
.tmp"
echo
-n
"Checking compression:
$svgfile
... "
node_modules/.bin/svgo
--config
.svgo.config.js
-i
"
$svgfile
"
-o
"
$outfile
"
-q
if
[
-f
$outfile
]
;
then
if
[
"
$(
wc
-c
<
"
$svgfile
"
)
"
-gt
"
$(
wc
-c
<
"
$outfile
"
)
"
]
;
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
Details
Attached
Mime Type
text/x-shellscript
Expires
Fri, Jul 3, 21:55 (5 h, 48 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2f/88/edc6925f67c4966929fc44906366
Default Alt Text
svg_check.sh (562 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment