scripts/build: parallelize compression better
This commit is contained in:
parent
832c9721af
commit
cc1fb1e6b4
@ -4,12 +4,12 @@ cd "$(git rev-parse --show-toplevel)"
|
|||||||
|
|
||||||
hugo --cleanDestinationDir --printPathWarnings --panicOnWarning
|
hugo --cleanDestinationDir --printPathWarnings --panicOnWarning
|
||||||
|
|
||||||
cd public
|
find public \
|
||||||
|
|
||||||
find . \
|
|
||||||
-name '*.html' -or \
|
-name '*.html' -or \
|
||||||
-name '*.xml' -or \
|
-name '*.xml' -or \
|
||||||
-name '*.txt' -or \
|
-name '*.txt' -or \
|
||||||
-name '*.css' -or \
|
-name '*.css' -or \
|
||||||
-name '*.map' -or \
|
-name '*.map' -or \
|
||||||
-name '*.pdf' | parallel --eta "zopfli {} && brotli {}"
|
-name '*.pdf' | \
|
||||||
|
awk '{print "zopfli "$0;print "brotli "$0}' | \
|
||||||
|
xargs -P$(nproc) -I{} $SHELL -c {}
|
||||||
|
Loading…
Reference in New Issue
Block a user