17 lines
426 B
Bash
Executable File
17 lines
426 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -xeuo pipefail
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
|
|
hugo --cleanDestinationDir --printPathWarnings --panicOnWarning
|
|
|
|
find public \
|
|
-name '*.html' -or \
|
|
-name '*.xml' -or \
|
|
-name '*.txt' -or \
|
|
-name '*.css' -or \
|
|
-name '*.map' -or \
|
|
-name '*.pdf' | \
|
|
tee >(xargs -n1 -P$(nproc) zopfli) | \
|
|
tee >(xargs -n1 -P$(nproc) zstd -19) | \
|
|
xargs -n1 -P$(nproc) brotli
|