Improve compress.sh and add brotli
This commit is contained in:
parent
996955eb46
commit
21cf60e198
20
compress.sh
20
compress.sh
|
@ -1,4 +1,18 @@
|
|||
for f in $(find public/ -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js"); do
|
||||
echo "Compressing $f..."
|
||||
gzip -nk $f
|
||||
#!/bin/sh
|
||||
|
||||
files=$(find public/ -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js")
|
||||
|
||||
for f in $files; do
|
||||
( gzip -fnk "$f" && echo "GZIP $f" ) &
|
||||
done
|
||||
|
||||
wait
|
||||
echo "gzip done, starting brotli"
|
||||
|
||||
|
||||
for f in $files; do
|
||||
( brotli -fZk "$f" && echo "BROTLI $f" ) &
|
||||
done
|
||||
|
||||
wait
|
||||
echo "broli done"
|
||||
|
|
Reference in New Issue