1
Fork 0
jakstys.lt/scripts/build

16 lines
393 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' | \
awk '{print "zopfli "$0;print "brotli "$0}' | \
xargs -P$(nproc) -I{} $SHELL -c {}