1
Fork 0

scripts/build: parallelize compression better

main
Motiejus Jakštys 2024-01-17 09:06:20 +02:00
parent 832c9721af
commit cc1fb1e6b4
1 changed files with 4 additions and 4 deletions

View File

@ -4,12 +4,12 @@ cd "$(git rev-parse --show-toplevel)"
hugo --cleanDestinationDir --printPathWarnings --panicOnWarning
cd public
find . \
find public \
-name '*.html' -or \
-name '*.xml' -or \
-name '*.txt' -or \
-name '*.css' -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 {}